3.9. Type Annotation Annotate

3.9.1. PyAnnotate

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

$ pip install pyannotate
$ pyannotate -w myfile.py

3.9.2. Monkeytype

$ pip install monkeytype
$ monkeytype run runtests.py
$ monkeytype stub some.module
$ monkeytype apply some.module