home-assistant-ecosystem / python-hole

Python API for interacting with a *hole instance.
MIT License
9 stars 14 forks source link

Add types for properties #8

Closed yuvalabou closed 2 years ago

yuvalabou commented 3 years ago

Add typing for properties - not all as we do not check full annotations on this package, and its just part of PR https://github.com/home-assistant/core/pull/51681

KapJI commented 3 years ago

Please note that in order to use these type hints in HA, typing information needs to be exported by adding py.typed marker. This requires having all functions type annotated, otherwise they won't be found by mypy.

KapJI commented 3 years ago

It'll fail on Python 3.6: https://github.com/home-assistant-ecosystem/python-hole/blob/master/.github/workflows/python.yml Also mypy is not being run as part of CI. And I think your code is not formatted with black.

yuvalabou commented 3 years ago

It'll fail on Python 3.6: https://github.com/home-assistant-ecosystem/python-hole/blob/master/.github/workflows/python.yml Also mypy is not being run as part of CI. And I think your code is not formatted with black.

Do we really need support for python 3.6? Most common I have seen support for the latest 3 version which are 3.7,3.8, and 3.9

fabaff commented 3 years ago

Python 3.7 and even Python 3.8 can be skipped, from my point of view, as distributions are starting to move to 3.10.