ip-tools / python-epo-ops-client

Python client for EPO OPS, the European Patent Office's Open Patent Services API.
Apache License 2.0
143 stars 58 forks source link

type hints #74

Open antonkulaga opened 9 months ago

antonkulaga commented 9 months ago

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

gsong commented 9 months ago

@antonkulaga PRs are always welcomed.

amotl commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

Great. Will look into that. Thanks for considering.

dbolser commented 6 months ago

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...

gsong commented 1 month ago

@mattkeanny Is this resolved by #87?