Skip to content

(🎁) Adopt pre-commit.ci #13281

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

Closed
KotlinIsland opened this issue Jul 29, 2022 · 8 comments
Closed

(🎁) Adopt pre-commit.ci #13281

KotlinIsland opened this issue Jul 29, 2022 · 8 comments
Labels
feature topic-developer Issues relevant to mypy developers

Comments

@KotlinIsland
Copy link
Contributor

The last remaining incomplete task from adopting black (#12424/#10996) is to add the pre-commit GitHub app to the mypy project.
I believe only owners have permission to do so. (@JukkaL)

@AlexWaygood
Copy link
Member

AlexWaygood commented Aug 25, 2022

@JukkaL, thoughts on this? It works really well over at typeshed; I think it would be a big quality-of-life improvement for contributors :)

@ssbarnea
Copy link
Contributor

It is like crack! A huge help and productivity boost for incoming PRs as it does report problems in seconds and can also fix basic mistakes, reducing the polishing time considerably. I used it for 3-4 years by now.

PS. I see that current pre-commit config uses only 3 hooks, I know few more that could help so there is space for improvement there too.

@JukkaL
Copy link
Collaborator

JukkaL commented Apr 19, 2023

Yeah, this sounds like a good idea. I'm not sure if I can do this, however, since mypy is under the Python org.

@AlexWaygood
Copy link
Member

AlexWaygood commented Apr 19, 2023

I'm not sure if I can do this, however, since mypy is under the Python org.

So is typeshed, but @JelleZijlstra managed to enable it for that repo without issues!

@JelleZijlstra
Copy link
Member

That prompted me to try whether I could do it for mypy too. I went through the flow on pre-commit.ci and tried to add mypy, but I think I only "requested" it. Maybe Jukka has enough access to actually enable it.

@ikonst
Copy link
Contributor

ikonst commented Apr 19, 2023

@ssbarnea mypy's self-check might be a good candidate :) though probably as a 'system' hook rather than using pre-commit's mypy hook, since the latter wouldn't have our custom plugin.

Update: #15084

@hauntsaninja
Copy link
Collaborator

Thanks to @ambv , we got pre-commit.ci added to the repo. #15116 shows that it works

@ssbarnea
Copy link
Contributor

The next move would be to replace flake8 with ruff, something I started about a month ago on ~10 project, it is awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature topic-developer Issues relevant to mypy developers
Projects
None yet
Development

No branches or pull requests

7 participants