Skip to content

Move type checking outside pre-commit #12866

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
wants to merge 1 commit into from

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Jul 21, 2024

See python/mypy#13916 and https://jaredkhan.com/blog/mypy-pre-commit

I'm basically taking the approach of "Running Mypy correctly outside of Pre-commit" (from the second link) and stopping there since I don't think we gain a lot by shoving mypy into pre-commit.

Keeping this as a draft to showcase all the new errors that mypy is now capable of flagging.

Invoke mypy with specific directories rather than a list of files found
by pre-commit in the repository. This makes it catch more errors and
issues.
@notatallshaw
Copy link
Member

@pradyunsg are you still interested in completing this?

The frozen additional-dependencies for pre-commit I find really easy to forget, I would like to move them into a dependency group, which would mean pulling mypy out of pre-commit as pre-commit has no other way to support dependencies.

I would be willing to pick this up.

@pradyunsg
Copy link
Member Author

I don't think I'll have the time to wrap this up in the near future -- please feel welcome to pick this up and drive it forward.

@ichard26
Copy link
Member

Superseded by @notatallshaw's PR #13476.

@ichard26 ichard26 closed this Jul 11, 2025
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.

3 participants