-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
add pre-commit config #6341
add pre-commit config #6341
Conversation
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
I guess this makes it also run black on the tests and scripts directories. That seems like a good thing to me, but I can figure out how to turn it off if that's preferred. |
.pre-commit-config.yaml
Outdated
@@ -0,0 +1,19 @@ | |||
repos: | |||
- repo: https://github.com/psf/black | |||
rev: 21.11b1 |
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.
It would be nice to have a comment about how this version must match requirements-tests-py3.txt
, ideally in both places. Same for isort.
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.
Good point, done
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Hey @JelleZijlstra 👋 |
Feel free to submit a PR removing the old script. typeshed doesn't really care what you do locally, pre-commit.ci will now automatically fix any formatting issues in PRs. |
As a maintainer, I have never used the local pre-commit script, and I have always considered it deprecated :) |
Fixes #5552.
Also upgrade Black and isort while I'm at it.
Added some random formatting changes in various files to make sure pre-commit fixes it.