Skip to content

Add opower to mypy pre-commit additional_dependencies#188

Draft
loganrosen wants to merge 1 commit into
tronikos:mainfrom
loganrosen:fix-mypy-precommit
Draft

Add opower to mypy pre-commit additional_dependencies#188
loganrosen wants to merge 1 commit into
tronikos:mainfrom
loganrosen:fix-mypy-precommit

Conversation

@loganrosen
Copy link
Copy Markdown
Contributor

The mypy pre-commit hook runs in an isolated environment that only has the packages listed in additional_dependencies. Without opower itself, mypy fails with import-not-found errors when checking test files that import from the opower package.

This only manifests during git commit (which passes only changed files to mypy), not during CI (which uses --all-files, allowing mypy to resolve imports from the src/ tree).

The mypy pre-commit hook runs in an isolated environment that only
has the packages listed in additional_dependencies. Without opower
itself, mypy fails with import-not-found errors when checking test
files that import from the opower package. This only manifested
during git commit (which passes only changed files to mypy), not
during CI (which uses --all-files, allowing mypy to resolve imports
from the src/ tree).
Comment thread .pre-commit-config.yaml
- pyotp
- pytest-mypy
- python-dotenv
- opower
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this pull from PyPI, not your local working tree?

@tronikos tronikos marked this pull request as draft May 1, 2026 05:35
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.

2 participants