pytest-mypy
===================================
Mypy static type checker plugin for pytest
.. image:: https://img.shields.io/pypi/v/pytest-mypy.svg
:target: https://pypi.org/project/pytest-mypy/
:alt: See Latest Release on PyPI
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`_:
.. code-block:: bash
$ pip install pytest-mypy
Usage
-----
You can enable pytest-mypy with the ``--mypy`` flag:
.. code-block:: bash
$ py.test --mypy test_*.py
Mypy supports `reading configuration settings <http://mypy.readthedocs.io/en/latest/config_file.html>`_ from a ``mypy.ini`` file.
Alternatively, the plugin can be configured in a ``conftest.py`` to invoke mypy with extra options:
.. code-block:: python
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:
.. code-block:: bash
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
https://github.com/dbader/pytest-mypy
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`file an issue`: https://github.com/dbader/pytest-mypy/issues
.. _`pip`: https://pypi.python.org/pypi/pip/
.. _`PyPI`: https://pypi.python.org/pypi
.. _`mypy`: http://mypy-lang.org/
.. _`pytest-flake8`: https://pypi.python.org/pypi/pytest-flake8
.. _`flake8`: https://pypi.python.org/pypi/flake8
.. _`@dbader_org`: https://twitter.com/dbader_org
Raw data
{
"_id": null,
"home_page": "https://github.com/dbader/pytest-mypy",
"name": "pytest-mypy",
"maintainer": "David Tucker",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "david@tucker.name",
"keywords": "",
"author": "Daniel Bader",
"author_email": "mail@dbader.org",
"download_url": "https://files.pythonhosted.org/packages/85/3a/318c91140f242cafff64ddac97d6999640bc3da9afbf37253475c2208e79/pytest-mypy-0.10.3.tar.gz",
"platform": null,
"description": "pytest-mypy\n===================================\n\nMypy static type checker plugin for pytest\n\n.. image:: https://img.shields.io/pypi/v/pytest-mypy.svg\n :target: https://pypi.org/project/pytest-mypy/\n :alt: See Latest Release on PyPI\n\nFeatures\n--------\n\n* Runs the mypy static type checker on your source files as part of your pytest test runs.\n* Does for `mypy`_ what the `pytest-flake8`_ plugin does for `flake8`_.\n* This is a work in progress \u2013 pull requests appreciated.\n\n\nInstallation\n------------\n\nYou can install \"pytest-mypy\" via `pip`_ from `PyPI`_:\n\n.. code-block:: bash\n\n $ pip install pytest-mypy\n\nUsage\n-----\n\nYou can enable pytest-mypy with the ``--mypy`` flag:\n\n.. code-block:: bash\n\n $ py.test --mypy test_*.py\n\nMypy supports `reading configuration settings <http://mypy.readthedocs.io/en/latest/config_file.html>`_ from a ``mypy.ini`` file.\nAlternatively, the plugin can be configured in a ``conftest.py`` to invoke mypy with extra options:\n\n.. code-block:: python\n\n def pytest_configure(config):\n plugin = config.pluginmanager.getplugin('mypy')\n plugin.mypy_argv.append('--check-untyped-defs')\n\nYou can restrict your test run to only perform mypy checks and not any other tests by using the `-m` option:\n\n.. code-block:: bash\n\n py.test --mypy -m mypy test_*.py\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license, \"pytest-mypy\" is free and open source software\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\nMeta\n----\n\nDaniel Bader \u2013 `@dbader_org`_ \u2013 https://dbader.org \u2013 mail@dbader.org\n\nhttps://github.com/dbader/pytest-mypy\n\n\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`file an issue`: https://github.com/dbader/pytest-mypy/issues\n.. _`pip`: https://pypi.python.org/pypi/pip/\n.. _`PyPI`: https://pypi.python.org/pypi\n.. _`mypy`: http://mypy-lang.org/\n.. _`pytest-flake8`: https://pypi.python.org/pypi/pytest-flake8\n.. _`flake8`: https://pypi.python.org/pypi/flake8\n.. _`@dbader_org`: https://twitter.com/dbader_org\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Mypy static type checker plugin for Pytest",
"version": "0.10.3",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a0ca2c1158c62bd5927f12286aa853a3",
"sha256": "7638d0d3906848fc1810cb2f5cc7fceb4cc5c98524aafcac58f28620e3102053"
},
"downloads": -1,
"filename": "pytest_mypy-0.10.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a0ca2c1158c62bd5927f12286aa853a3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7110,
"upload_time": "2022-12-18T18:47:20",
"upload_time_iso_8601": "2022-12-18T18:47:20.739167Z",
"url": "https://files.pythonhosted.org/packages/24/02/36a48da6d4168db8fb596c040680665bee89a7bced22ba1eee75920059c4/pytest_mypy-0.10.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "c82c99676687851d68a2733369639954",
"sha256": "f8458f642323f13a2ca3e2e61509f7767966b527b4d8adccd5032c3e7b4fd3db"
},
"downloads": -1,
"filename": "pytest-mypy-0.10.3.tar.gz",
"has_sig": false,
"md5_digest": "c82c99676687851d68a2733369639954",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 14020,
"upload_time": "2022-12-18T18:47:21",
"upload_time_iso_8601": "2022-12-18T18:47:21.848413Z",
"url": "https://files.pythonhosted.org/packages/85/3a/318c91140f242cafff64ddac97d6999640bc3da9afbf37253475c2208e79/pytest-mypy-0.10.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-18 18:47:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "dbader",
"github_project": "pytest-mypy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pytest-mypy"
}