4.15. Typing Annotate

4.15.1. PyAnnotate

The -w flag means "go ahead, update the file":

$ python -m pip install pyannotate
$ python -m pyannotate -w myfile.py

4.15.2. Monkeytype

$ python -m pip install monkeytype
$ python -m monkeytype run myfile.py
$ python -m monkeytype stub myfile.py
$ python -m monkeytype apply myfile.py