When using multiple tools that either check or format python files, is there a way to set line length once for all?
Currently I have:
.flake8
file:
max-line-length = 120
.isort.cfg
file:
line-length = 120
.black
file:
line-length = 120
.pylintrc
file:
max-line-length = 120
If you use Poetry, it's possible to configure all the above in the pyproject.toml file as a workaround.
For example, my project looks like this:
This is combined with a .pre-commit-config.yaml file that kicks off each tool upon commits, respectively:
Haven't used the individual linters much outside of pre-commit hooks, but would think they behave the same way when run via
poetry shell
orpoetry run black --check --diff file_name.py
for instance.