I\'m working with a large existing Python codebase and would like to start adding in type annotations so I can get some level of static checking. I\'m imagining something l
Check out this post: PySonar: a Static Analyzer for Python. PySonar is a tool that infers types using abstract interpretation (partially executing) of code. It finds all possible execution paths of your program and finds all possible types of all variables.
There are basically three versions of PySonar:
None of them (except of closed source one) is fully implemented. But the basic idea is that you can use it as a basis for your work.