Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type hints #166

Open
radarhere opened this issue Feb 18, 2024 · 2 comments
Open

Type hints #166

radarhere opened this issue Feb 18, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@radarhere
Copy link
Contributor

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 - python/typeshed#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/

@decalage2
Copy link
Owner

Hi @radarhere, thanks a lot for all this work!
What would you suggest to do within olefile?

@radarhere
Copy link
Contributor Author

The simplest option would be to just

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants