forked from Toblerity/Fiona
-
Notifications
You must be signed in to change notification settings - Fork 0
Generating Python Stubs
Stefan Brand edited this page May 4, 2023
·
4 revisions
-
mypy's stubgen
- command:
stubgen fiona
- output: https://github.com/EOX-A/Fiona/tree/types-static-mypy/out/fiona
- command:
-
Microsoft's pyright
- command:
pyright --createstub fiona
- output: https://github.com/EOX-A/Fiona/tree/types-static-pyright/typings/fiona
- command:
-
Google's pytype
- command:
pytype --always-use-return-annotations --no-report-errors fiona
- output: https://github.com/EOX-A/Fiona/tree/types-static-pytype/.pytype/pyi/fiona
- command:
- Instagram's MonkeyType: https://github.com/instagram/MonkeyType
- command:
pip install pytest-monkeytype mkdir typings && cd typings && MONKEYTYPE_TRACE_MODULES=fiona pytest --monkeytype-output=monkeytype.sqlite3 .. mkdir -p fiona/fio && monkeytype list-modules | xargs -I {} sh -c 'monkeytype stub "$1" > "$(echo $1 | tr '.' '/').pyi"' -- {}
- output: https://github.com/EOX-A/Fiona/tree/types-runtime-monkeytype/fiona
- command:
- pyannotate by Guido van Rossum, latest release Sept. 2019 https://pypi.org/project/pyannotate/
-
pyannotate
cannot create stubs, only inline type annotations. Therefore it is out-of-scope for now.
-