pytest monkeytype:从pytest测试生成monkeytype注释。
pytest-monkeytype的Python项目详细描述
MonkeyType作为 pytest插件。
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
这个项目的灵感来自 pytest-annotate