pytest-mypy
Mypy static type checker plugin for pytest
Features
Runs the mypy static type checker on your source files as part of your pytest test runs.
Does for mypy what the pytest-flake8 plugin does for flake8.
This is a work in progress – pull requests appreciated.
Installation
You can install “pytest-mypy” via pip from PyPI:
$ pip install pytest-mypy
Usage
You can enable pytest-mypy with the --mypy flag:
$ py.test --mypy test_*.py
Mypy supports reading configuration settings from a mypy.ini file. Alternatively, the plugin can be configured in a conftest.py to invoke mypy with extra options:
def pytest_configure(config):
plugin = config.pluginmanager.getplugin('mypy')
plugin.mypy_argv.append('--check-untyped-defs')
You can restrict your test run to only perform mypy checks and not any other tests by using the -m option:
py.test --mypy -m mypy test_*.py
License
Distributed under the terms of the MIT license, “pytest-mypy” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Meta
Daniel Bader – @dbader_org – https://dbader.org – mail@dbader.org
Metadata
Release files for pytest-mypy 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytest_mypy-1.0.1.tar.gz | 16.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_mypy-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.7 kB
Release files / pytest_mypy-1.0.1.tar.gz
| Download URL | pytest_mypy-1.0.1.tar.gz |
|---|---|
| Size | 16.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f5fcaff75c80dccc6b68cf5ecc28e1bbe71e95309469eb7a28bf408ce55c074
|
|
BLAKE2b-256 checksum How to use checksums |
b0503ce149b469e27848c1dc354553b17774f9dde0140625f5a4130bd21e1052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Release files / pytest_mypy-1.0.1-py3-none-any.whl
| Download URL | pytest_mypy-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad7133c9b92c802e032f2596590ebede7eea7c418e61d60d5cdd571b55c72056
|
|
BLAKE2b-256 checksum How to use checksums |
bf9325ed3c02e15c4ef1b04cbda7c708ffc5da755986aaacfb48db1f9e84a996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.18
|
Security for pytest-mypy 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.