Open jvanderaa opened 4 years ago
So of note is that the line length is not the only variable at hand.
We explicitly use version 19.3b0
of black, because the latest version changes the output significantly enough to hold back. So specifying the line length isn't sufficient to ensure output passes tox tests.
As such, the supported way of making sure your files are correctly formatted is with tox -e black
which will fetch and run the correct version of black, and tox -e linters
which will also run flake8, but only report errors and not make any changes.
This request has merit, and specifying line length in pyproject.toml does mean we don't have to specify it in tox.ini, but it isn't likely to happen without coordinated changes across all supported collections.
Makes sense. Within my development practices, and I can be convinced to change, but I often would do just black .
to run and allow the configuration file in the project repo handle the settings involved. That is for just black
specifically however. I get there is a bunch more at play as well. I can submit a base one if you would like, or proceed however it may look to get across the board. That is something that I don't have line of sight to that you have a much better viewpoint on.
SUMMARY
Running black executable should format python as expected.
ISSUE TYPE
COMPONENT NAME
black
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
black .
which reformats the documentsEXPECTED RESULTS
black .
would reformat all Python files as expectedACTUAL RESULTS
Reformat works, tox linter fails in Zuul