4.15. Typing Annotate
4.15.1. PyAnnotate
Annotating existing code
The -w flag means "go ahead, update the file":
$ python -m pip install pyannotate
$ python -m pyannotate -w myfile.py
4.15.2. Monkeytype
Annotating existing code
$ python -m pip install monkeytype
$ python -m monkeytype run myfile.py
$ python -m monkeytype stub myfile.py
$ python -m monkeytype apply myfile.py