Skip to content

python-build-tools/pytest-mypy-runner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytest-mypy-runner

Run the mypy static type checker as a pytest test case

Usage

After adding this library to your dev/test dependencies and installing, add the following file to your test folder:

test_mypy.py

from pytest_mypy_runner import test_mypy  # noqa

Pytest should then pick up the test_mypy test.

Note: The # noqa is there to prevent formatters/linters like autoflake from removing what otherwise appears to be an unused import.

Configuration

The nearest pyproject.toml file will be used to configure mypy, traversing upward from the folder where test_mypy.py resides. Add any custom configuration to the [tool.mypy] section.

About

Run the mypy static type checker as a pytest test case

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%