Gather data via unit tests: $ monkeytype run -m nose Then apply types to a file: $ monkeytype apply anki.sched