https://github.com/mariusvniekerk/pytest-monkeytype
https://github.com/mariusvniekerk/pytest-monkeytype
pep484 pytest-plugin python3 typing
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mariusvniekerk/pytest-monkeytype
- Owner: mariusvniekerk
- License: mit
- Created: 2018-02-24T16:15:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-29T20:47:50.000Z (over 5 years ago)
- Last Synced: 2025-08-20T10:16:03.543Z (3 months ago)
- Topics: pep484, pytest-plugin, python3, typing
- Language: Python
- Size: 28.3 KB
- Stars: 46
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-python-typing - pytest-monkeytype - MonkeyType plugin for pytest. (Tools / Helper tools to add annotations to existing code)
README
# pytest-monkeytype
[](https://travis-ci.org/mariusvniekerk/pytest-monkeytype)
[](https://opensource.org/licenses/Apache-2.0)
[](https://pypi.python.org/pypi/pytest-monkeytype)
[](https://pypi.python.org/pypi/pytest-monkeytype)
[](https://pypi.python.org/pypi/pytest-monkeytype)
[](https://pypi.python.org/pypi/pytest-monkeytype)
[MonkeyType](https://github.com/Instagram/MonkeyType) as a
[pytest](https://docs.pytest.org/en/latest/) plugin.
```
pip install pytest-monkeytype
# Generate annotations by running your pytest tests as usual:
py.test --monkeytype-output=./monkeytype.sqlite3
# Get a listing of modules annotated by monkeytype
monkeytype list-modules
# Generate a stub file for those annotations using monkeytype:
monkeytype stub some.module
# Apply these annotations directly
monkeytype apply some.module
```
This project is inspired by [pytest-annotate](https://github.com/kensho-technologies/pytest-annotate)