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

Add type hints according to PEP 484 #56

Open
septatrix opened this issue Aug 22, 2020 · 3 comments · May be fixed by #65
Open

Add type hints according to PEP 484 #56

septatrix opened this issue Aug 22, 2020 · 3 comments · May be fixed by #65

Comments

@septatrix
Copy link

This could be archived by either incorporating type hints inside the source code directly or creating a stub file .pyi.

The first one would probably be the prefered way as the library is relatively small but it can be cumbersome should older python versions still be supported (as for Python 2.7 - 3.5 these hints would need to be added as comments). Alternatively a simple stub could be created.
As however this library is fairly stable and no major features get added creating a new version for only newer python versions does not seem like to bad of an idea. (Especially given that 2.7 already reached end of live and 3.5 will do so too next month)

@septatrix
Copy link
Author

@dwolfhub would you accept a PR for this? If yes what variant would you prefer?

@dwolfhub
Copy link
Owner

Thanks @septatrix ..

I'd accept a PR and I think I agree that putting type hints in the source and only supporting future versions is the way to go.

@septatrix
Copy link
Author

I pushed my work so far. Mypy still outputs some errors and I accidentally let my formatter run on one of the files which I will have to manually revert to keep the diff as small as possible.

@covert-encryption covert-encryption linked a pull request Nov 16, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants