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

REF: Make mypy manual stage with pre-commit #6024

Merged
merged 2 commits into from
Feb 9, 2022

Conversation

snowman2
Copy link
Contributor

@snowman2 snowman2 commented Nov 24, 2021

With this setup, the mypy hook is only added to the run if you specify it:

pre-commit run --all-files --hook-stage manual

cc: @dcherian

https://pre-commit.com/#confining-hooks-to-run-at-certain-stages

@snowman2 snowman2 changed the title REF: Make mypy nanual stage with pre-commit REF: Make mypy manual stage with pre-commit Nov 24, 2021
@max-sixty
Copy link
Collaborator

Thanks @snowman2 .

This is excellent! I didn't know we could pass --all like that.

I'm a 👍. Can we update the PR template to include that flag?

@dcherian
Copy link
Contributor

I like this!

@snowman2
Copy link
Contributor Author

I didn't know we could pass --all like that.

I think it is equivalent to --all-files

@Illviljan
Copy link
Contributor

Is mypy being run in the CI now?

@snowman2
Copy link
Contributor Author

Is mypy being run in the CI now?

Yes, it runs on the CI

@max-sixty
Copy link
Collaborator

Ah — one thing to check — I'm not sure it's running in https://results.pre-commit.ci/run/github/13221727/1637775215.Vi4gz7adRWeUAsEu1oJeZA — can we make it? We were hoping to replace the existing CI job with this.

@snowman2
Copy link
Contributor Author

can we make it?

I am not seeing an option to do that: https://pre-commit.ci/

@max-sixty
Copy link
Collaborator

OK, I'd vote to merge this, leave the existing CI job, and then remove it when pre-commit.ci allows running manual stages. One of the main benefits of pre-commit.ci is that it adds changes to the branch, which doesn't help for mypy anyway.

@max-sixty
Copy link
Collaborator

I'm sorry this dropped. Could we resolve conflicts and then merge?

@snowman2
Copy link
Contributor Author

snowman2 commented Feb 5, 2022

No worries. I will try to address the conflicts when I get a free moment. Though, I wouldn't complain if someone else with a sooner free moment finished this one off before I do :-).

@snowman2 snowman2 force-pushed the manual_stage branch 2 times, most recently from 7cc7190 to 54066e5 Compare February 9, 2022 02:06
@max-sixty
Copy link
Collaborator

Thanks a lot @snowman2 !

@max-sixty max-sixty merged commit e71de63 into pydata:main Feb 9, 2022
@snowman2 snowman2 deleted the manual_stage branch February 9, 2022 15:07
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

Successfully merging this pull request may close these issues.

4 participants