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

Mypy checks pass in pre-commit but fail when run in Github #83

Open
bsowell opened this issue Oct 4, 2023 · 0 comments
Open

Mypy checks pass in pre-commit but fail when run in Github #83

bsowell opened this issue Oct 4, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bsowell
Copy link
Contributor

bsowell commented Oct 4, 2023

Mypy sometimes succeeds when run in pre-commit, but fails with legitimate type issues when run in isolation or in Github (example job).

This seems to be a somewhat common issue (e.g. see pypa/pip#9502), though I haven't had success with any of the proposed workarounds. There are some more ideas here, though they aren't entirely satisfactory. Part of the issue seems to be how pre-commit works by running in a separate virtualenv.

In the meantime, running poetry run mypy --install-types . in the root of the project appears to surface the correct errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant