We should add stub files of types, especially for the public API. We should also then start paying attention to mypy's static type checking.