Skip to content

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

Merged
max-sixty merged 2 commits into
pydata:mainfrom
snowman2:manual_stage
Feb 9, 2022
Merged

REF: Make mypy manual stage with pre-commit#6024
max-sixty merged 2 commits into
pydata:mainfrom
snowman2:manual_stage

Conversation

@snowman2

@snowman2snowman2 commented Nov 24, 2021

Copy link
Copy Markdown
Contributor

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

@snowman2snowman2 changed the title REF: Make mypy nanual stage with pre-commitREF: Make mypy manual stage with pre-commitNov 24, 2021
@max-sixty

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

I like this!

Comment thread.pre-commit-config.yaml
@snowman2

Copy link
Copy Markdown
ContributorAuthor

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

I think it is equivalent to --all-files

@Illviljan

Copy link
Copy Markdown
Contributor

Is mypy being run in the CI now?

@snowman2

Copy link
Copy Markdown
ContributorAuthor

Is mypy being run in the CI now?

Yes, it runs on the CI

@max-sixty

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

can we make it?

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

@max-sixty

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@snowman2

Copy link
Copy Markdown
ContributorAuthor

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
snowman2force-pushed the manual_stage branch 2 times, most recently from 7cc7190 to 54066e5CompareFebruary 9, 2022 02:06
snowman2and others added 2 commits February 8, 2022 20:09
Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com>
@max-sixty

Copy link
Copy Markdown
Collaborator

Thanks a lot @snowman2 !

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

@snowman2@max-sixty@dcherian@Illviljan