Python - Automatic Type Hinting With Monkeytype12 May 2021I’ve been poking around with adding type hints to Python code automatically. Here’s my process so far:1. `pip install MonkeyType` 1. run tests with `monkeytype run` instead of `python` 1. pytest: `monkeytype run -m pytest` 1. `mkdir stubs` 1. `monkeytype list-modules | xargs -n1 -I{} sh -c 'monkeytype stub {} > stubs/{}.pyi'` 1. `pip install pytype` 1. `python move_files.py` (file in this gist) 1. `mypy <code folder name>` 1. remove duplicate imports added by merge-pyi, fix import sorting issues 1. clean up super long type hints by inlining with params