
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
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
mypy
_ what the pytest-flake8
_ plugin does for flake8
_.You can install "pytest-mypy" via pip
_ from PyPI
_:
.. code-block:: bash
$ pip install pytest-mypy
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
Distributed under the terms of the MIT
_ license, "pytest-mypy" is free and open source software
If you encounter any problems, please file an issue
_ along with a detailed description.
Daniel Bader – @dbader_org
_ – https://dbader.org – mail@dbader.org
https://github.com/realpython/pytest-mypy
.. _MIT
: http://opensource.org/licenses/MIT
.. _file an issue
: https://github.com/realpython/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
FAQs
A Pytest Plugin for Mypy
We found that pytest-mypy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.