4. Annotating existing code

4.1. PyAnnotate

$ pip install pyannotate

# (the -w flag means “go ahead, update the file”)
$ pyannotate -w FILE

4.2. monkeytype

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