Mypy static type checker plugin for Pytest
Project description
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. This is currently the only way to configure mypy through pytest-mypy. In the future pytest-mypy may offer a passthrough for command line options.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Development Environment Setup
Here’s how to install pytest-mypy in development mode so you can test your changes locally:
$ pyvenv venv
$ source venv/bin/activate
$ python setup.py develop
$ venv/bin/py.test --mypy example_test.py
How to publish a new version to PyPI
$ pip install twine wheel
$ python setup.py sdist bdist_wheel
$ twine upload dist/*
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pytest_mypy-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab09e95cfdcdb49db6d2531b360cb96e2cf7a3ce128e7efb970da6dd818df2ad |
|
MD5 | ff97f2202c5aee4b00bb165af2e845d0 |
|
BLAKE2b-256 | 89c61495db235fff95dc57b6d290a1667294984a67fbae94a1e21a088f635464 |