KO
|
EN
gitlite — search
Search
#python
#javascript
#react
#nextjs
#csharp
#threejs
#swift
#docker
#go
#css
#pytorch
#machine-learning
typeforce
★ 21
Open GitHub ↗
Make mypy more effective
Download README (.md)
Explore Similar Repositories
destropy
:
No description available.
kubernetes-typed
:
mypy plugin to type check Kubernetes resources
protostub
:
A tool for generating Mypy type stubs from a Protocol Buffer definition.
mongo-types
:
:fallen_leaf: Type stubs for mongoengine, pymongo, and bson
safe-assert
:
Safe and composable assert for Python that can be used together with optimised mode
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
typeforce
?
Download (.md)
# typeforce **Typeforce** is a CLI tool that enriches your Python environment with type annotations, empowering [mypy](https://mypy.readthedocs.io/en/stable/). In particular: + Generates `py.typed` for annotated packages. + Installs missed stub files and plugins. ## py.typed [PEP-561](https://www.python.org/dev/peps/pep-0561/) says the following: > Package maintainers who wish to support type checking of their code MUST add a marker file named py.typed to their package supporting typing. In practice, many maintainers don't know about this marker. So there are tons of packages that do have type annotations but don't have `py.typed`. Typeforce checks all installed third-party packages and adds `py.typed` into packages that have type annotations. ## stubs and plugins One of the breaking changes [mypy 0.900 introduced](http://mypy-lang.blogspot.com/2021/06/mypy-0900-released.html?m=1) is moving out all [stubs](https://mypy.readthedocs.io/en/stable/stubs.html) and plugins for third-party packages out of mypy itself. Now, stub files for every such package should be installed manually. Typeforce scans all installed third-party packages and installs all needed stub files and plugins if available. ## Installation ```bash python3 -m pip install --user typeforce ``` ## Usage ```bash python3 -m typeforce --exe python3.9 ```