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 #74

Open
antonkulaga opened this issue Dec 21, 2023 · 6 comments
Open

type hints #74

antonkulaga opened this issue Dec 21, 2023 · 6 comments

Comments

@antonkulaga
Copy link

Please, add typehints, it will make the library way easier to use!

@gsong
Copy link
Member

gsong commented Dec 21, 2023

@antonkulaga PRs are always welcomed.

@amotl
Copy link
Member

amotl commented Jan 15, 2024

Dear Anton,

thank you for writing in. Having type hints would certainly be an improvement, on both aspects of QA and UX. Would you have the capacity to submit a corresponding patch?

With kind regards,
Andreas.

@mattkeanny
Copy link
Contributor

mattkeanny commented Jan 24, 2024

It would be great to enhance the library with type hints, indeed. However since the library still supports python 3.6 the type annotations are quite limited.
Python 3.7 allows the use of from __future__ import annotations (see docs) which would allow a more comprehensive set of type hints.
Question: Is dropping support for python 3.6 an option for this library?

@gsong
Copy link
Member

gsong commented Jan 24, 2024

It would be great to enhance the library with type hints, indeed. However since the library still supports python 3.6 the type annotations are quite limited. Python 3.7 allows the use of from __future__ import annotations (see docs) which would allow a more comprehensive set of type hints. Question: Is dropping support for python 3.6 an option for this library?

Seeing as Python 3.6 end-of-life happened on 2021-12-23, 3.7 EOL happened on 2023-06-27, I would say we can safely drop support for Python 3.6 and possibly even 3.7.

@mattkeanny Would you be up for making a PR with both type hints and for updating support for 3.8 and up only? This would be a major version bump.

@mattkeanny
Copy link
Contributor

Great. Will look into that. Thanks for considering.

@dbolser
Copy link

dbolser commented Mar 24, 2024

What's the good news? I suspect ChatGPT could add type hints quite reliably... If nobody's working on it, I don't mind using CoPilot to make a PR...

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

No branches or pull requests

5 participants