Closed 098799 closed 5 years ago
If the black configuration given in the .flake8
(etc) file is a relative path, as a user I would expect this to be interpreted relative to the location of the configuration file (not relative to the current directory which is my guess for what happens with the current code). Does that seem like a good idea?
Or we could just insist on an absolute path?
This pull request would close issue #9.
If the black configuration given in the
.flake8
(etc) file is a relative path, as a user I would expect this to be interpreted relative to the location of the configuration file (not relative to the current directory which is my guess for what happens with the current code). Does that seem like a good idea?Or we could just insist on an absolute path?
Definitely sounds like an improvement.
I think I covered all the comments, please recheck when you have the time.
Feel free to bump the version number to v0.1.1
and add a line to the release history in README.rst
? Something like:
Option to use a (global) black configuration file, contribution from Tomasz Grining.
Otherwise I'll probably merge this and do that tomorrow. Thanks!
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,
$ black -h
This suggests a trivial test to add to tests/run_tests.sh
,
flake8 -h 2>&1 | grep "black-config"
Easy fix - string vs tuple for the help argument
Merged, thank you 🎉
Ugh, sorry about it, flake8-strict
has terrorized me about always adding those silly commas and in some places it changes the meaning.
Ready to embrace black
's trailing comma handling...
@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 flake8 configuration file, which points to the.toml
file that should be used instead of the default blackpyptoject.toml
.