Skip to content
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

Black version is no longer specified anywhere. #76

Open
shaleh opened this issue Mar 28, 2022 · 3 comments
Open

Black version is no longer specified anywhere. #76

shaleh opened this issue Mar 28, 2022 · 3 comments

Comments

@shaleh
Copy link
Contributor

shaleh commented Mar 28, 2022

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

@shaleh
Copy link
Contributor Author

shaleh commented Mar 28, 2022

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
Copy link
Contributor

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants