Tool to translate type comments to annotations.
Tool for translation of type comments to type annotations in Python.
This tool requires Python 3.8 to run. But the supported target code version is Python 3.4+ (can be specified with --python-minor-version).
Currently, the tool translates function and assignment type comments to type annotations.
The philosophy of of the tool is too minimally invasive, and preserve original formatting as much as possible. This is why the tool doesn’t use un-parse.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.