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

Do not ignore missing type imports from pytest #590

Merged
merged 2 commits into from Oct 8, 2020

Conversation

cjolowicz
Copy link
Owner

The pytest 6.0.0 release added support for static typing, with types distributed inline with the package (as per PEP 561).

This PR removes the following pytest-related exceptions from mypy.ini:

  • Remove ignore_missing_imports for pytest
  • Remove allow_untyped_decorators for tests

For this to work, we also need to install pytest into the Nox session for mypy. This allows mypy to access the type information distributed with pytest.

Closes #552

The pytest 6.0.0 release added support for static typing, with types distributed
inline with the package (as per PEP 561). This means that we need to install
pytest for mypy to be able to access the type information.
@cjolowicz cjolowicz added the bug Something isn't working label Oct 8, 2020
@cjolowicz cjolowicz added this to the 2020.10.15 milestone Oct 8, 2020
@cjolowicz cjolowicz merged commit 5cd7887 into master Oct 8, 2020
@cjolowicz cjolowicz deleted the retrocookie-pr/pytest-types branch October 8, 2020 14:14
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

Successfully merging this pull request may close these issues.

Do not ignore missing type imports from pytest
1 participant