Type hints
Hi. In case you were interested in adding type hints in this repository, just letting you know - I recently added type hints for olefile to typeshed - https://github.com/python/typeshed/pull/11416. If you wanted to make use of that, it would give you a good head start on that endeavour.
The stubs package can be seen at https://pypi.org/project/types-olefile/
Hi @radarhere, thanks a lot for all this work! What would you suggest to do within olefile?
The simplest option would be to just
- add the relevant *.pyi files alongside the existing *.py files as per https://peps.python.org/pep-0484/#storing-and-distributing-stub-files, and
- add a
py.typedfile as per https://peps.python.org/pep-0561/#packaging-type-information
If instead you were interested in being more thorough and running a tool like https://mypy-lang.org/ over the code, then you'd want to update your code with the type arguments, e.g. replacing def build_storage_tree(self): with def build_storage_tree(self) -> None:, as mypy would want you to make other changes within the body of the code.