Pytype - https://github.com/google/pytype/
Pytype is a static type inferencer for Python code.
Apache 2.0
With PEP 484, there's now an official standard for adding type declarations to Python code. This project aims to help you annotate your source files and to provide automatic static type-checking for your code.
Additional to PEP 484 in-line declarations, types declarations can be specified in an external file with the extension "pytd". For example if you want to provide types for "application.py", you define the type inside the file "application.pytd". Examples of type declarations files can be found in the /pytd/tests/ folder.
Here’s an example of a simple type declaration file:
class Logger:
def log(self, messages: list[str]) -> NoneType raises IOException
git clone https://github.com/google/pytype.git
git submodule init
git submodule update
python setup.py install
pip install ply
pytype your_python_code.py
- Check out the issue tracker
- Mailing List: https://groups.google.com/forum/#!forum/pytypedecl-dev
- Send us suggestions
- Fork