SmylerMC/litemapy

Add type hints

Closed this issue · 1 comments

this would probably need a bump to python 3.11 so typing.Self becomes available

I agree that type annotations are a lot nicer than sphinx docstrings to provide type hints. Typing annotations support has improved quite a lot since I initially wrote the documentation two years ago.

I don't want to drop support for Python 3.9 just now, let alone 3.10. Statistics show they are still used quite a bit, and some popular LTS Linux distributions still ship them by default. Maybe typing_extensions would be a solution, but I don't know how well it is supported by IDEs and Sphinx, so that would have to be tested.

I don't want to mix-up two systems, so all Sphinx type hints in the existing code-base would have to be replaced with type annotations (Despite me already using annotations in the tests out of habit).

Overall, I would consider this to be a very low priority issue, since the current system works well. Now, if someone wants to take care of it, I would gladly accept a PR, as long as the previously mentioned problems are taken into account.