-
Notifications
You must be signed in to change notification settings - Fork 10
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
Check pre-commit in GitHub Actions #626
Conversation
f1cf118
to
b3e7540
Compare
8958f19
to
64c5fbe
Compare
64c5fbe
to
37d5d90
Compare
This was a relatively simple change when I first filed it, but it has gotten more complicated. Here's what I have had to do:
These last couple of changes were not strictly related, but were effectively required to get CI to pass while installing packages because package versions are allowed to float, causing various package versioning mismatches. |
Also updated the versions in pre-commit to match the versions in Pipfile.lock by using |
I'm speechless here, @chriszs . You are absolutely amazing. Everything looks stellar, just stunning. Just to double-check one thing right at the beginning -- you're replacing the old linting step with a call to run precommit, so there's no repetition? |
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.
Stunning work, @chriszs .
@stucka Yes, that's right. |
This PR consolidates linting and type checking into a single step in CI which uses pre-commit. The benefit of this is that it enforces the use of pre-commit when submitting a PR, flagging when somebody has forgotten to do so and thus preventing the introduction of formatting issues into the code base (which will subsequently trip up anyone contributing to those files). This also upgrades mypy to 1.9.0 to clear an apparently erroneous pre-commit type checking error (
error: Self? has no attribute "post" [attr-defined]
when I ranpipenv run pre-commit run --all
) and fixes formatting issues that have snuck in throughout the code base.Closes #625