-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
pre-commit: Add more jobs #521
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please try to open up the changes you made to the discussion. Ruff PR was merged almost immediately, which is sometimes a good thing, but I'm not sure about that case. The content of this PR is similar: There is a dump of configuration in the repo that needs a thorough explanation of their purpose and selection.
@cclauss Let me rephrase my review: This PR adds
Ruff PR added
Having pyupgrade, flake8, black, etc., in place is good, but adding 96 different linter settings without discussing them first is not the best way to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just gave my review, not sure why it was requested again.
Hello here are my first thoughts on this one Adding pre-commit checks for things which commonly fail in CI is definitely a good idea. Are there any common problems? Indiscriminately adding lots of checks before people can commit anything is definitely a bad idea. If we accept these then people can reasonably assume they are expected. I think pre commit hooks should usually be a curated subset of the CI checks - @cclauss is that the case here ? We should avoid unnecessarily adding things which make it harder to start contributing or significantly slower to commit. I have not specifically assessed this set of pre-commit hooks to know where they fall within that range. The PR message above doesn't help me to assess them. As it stands I'd say thank you very much but no thanks unless someone has time to fill the gaps in information. |
c9acbe4
to
21bc5dc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the diff I can see this is enforcing rules which are not included in CI. Pre commit checks should only be a strict subset of CI checks to avoid adding noise to other people's PRs.
I have proposed this set of pre-commit hooks. If you tell me which ones you object to, I can remove them. |
All which are not part of ci, to avoid adding noise to PRs |
%
grep http .pre-commit-config.yaml
Learn more about this config here: https://pre-commit.com/
%
git diff master --name-only
.pre-commit-config.yaml
# I modified this filepyproject.toml
# This file was modified bypyproject-fmt
and validated byvalidate-pyproject
requirements.txt
# This file was modified byrequirements-txt-fixer
test_app/models.py
# This file was modified byauto-walrus
waffle/management/commands/waffle_delete.py
# This file was modified byauto-walrus
waffle/models.py
# This file was modified byauto-walrus
waffle/tests/test_templates.py
# This file was modified bycodespell
as started in: