I suggest adding https://github.com/python/mypy to add static types to the source code, it would make things easier