MichaelAquilina / flake8-spellcheck

❄️ Spellcheck variables, classnames, comments, docstrings etc
MIT License
72 stars 28 forks source link

Black version is no longer specified anywhere. #76

Open shaleh opened 2 years ago

shaleh commented 2 years ago

The switch to poetry dropped the locking to a specific version of black. The target_version in pyproject.toml says "py37".

shaleh commented 2 years ago

Ok, i just found it in the .pre-commit-config.yaml. That was not very obvious.

Is there a reason not to declare it somewhere more prominent and have pre-commit use that definition? If people want to configure their editor for flake8, isort, black, etc etc. support how will they know what versions or options are needed?

djmattyg007 commented 2 years ago

I agree, it should be possible to run code quality tools without first trying to create a commit. I'd rather deal with issues earlier rather than later.

MichaelAquilina commented 2 years ago

Using pre-commit to ensure correct linting is pretty standard nowadays in most python projects (even Django).

I dont have any opposition to also putting black, isort and flake8 inside dev-requirements as I would assume this helps with the developer experience. The downside here is that we need to make sure the two declared versions are in sync (one in pyproject.toml and one in the pre-commit configuration).

However within teams I've been working on, maintaining and making sure these two values are in sync has not proven very troublesome so I think we can go down that route.