New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/BLACK_CONFIG: Black configuration file configurable #11
feature/BLACK_CONFIG: Black configuration file configurable #11
Conversation
49ab7da
to
977ccdc
Compare
flake8_black.py
Outdated
type="string", | ||
parse_from_config=True, | ||
help=( | ||
"A path to the global configuration file for ``black``. This file will" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about something shorter:
help="Path to black configuration file (by default looks for pyproject.toml)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tbh it sounds a bit confusing to me, but I'd be fine with: Path to black configuration file (overrides the default pyproject.toml)
If the black configuration given in the Or we could just insist on an absolute path? |
This pull request would close issue #9. |
Definitely sounds like an improvement. |
bbd89b8
to
124a723
Compare
I think I covered all the comments, please recheck when you have the time. |
Feel free to bump the version number to
Otherwise I'll probably merge this and do that tomorrow. Thanks! |
Added `flake8-black-config` parameter to be set in flake8 configuration file, which points to the `.toml` file that should be used instead of the default black `pyptoject.toml`.
124a723
to
77ddf99
Compare
Ok, squashed commits and added the version bump. |
Looks good. Time to try and break it in local testing 😁 |
Looks like something isn't quite right in the new configuration option,
This suggests a trivial test to add to flake8 -h 2>&1 | grep "black-config" |
Easy fix - string vs tuple for the help argument |
Merged, thank you 🎉 |
Ugh, sorry about it, |
@peterjc Will you release this version on pypi or are we waiting for figuring out the issues with relative paths etc? |
I wanted to include the bad TOML error handling as part of the release, and ideally the path issue too (putting out a release only to change something like how the configuration is interpreted in the next release is a bad idea). |
Added
flake8-black-config
parameter to be set in flake8configuration file, which points to the
.toml
file that should beused instead of the default black
pyptoject.toml
.