chimpler / pyhocon

HOCON parser for Python
Apache License 2.0
506 stars 119 forks source link

Generate PEP-484 Stub Files to enable mypy checking #210

Open mjmeehan opened 5 years ago

mjmeehan commented 5 years ago

https://www.python.org/dev/peps/pep-0484/#stub-files

Can use the stubgen script bundled with mypy to create a very basic stub file, then improve on that. Would be better to annotate the code itself with type annotations rather than using a stub file, but that may break compatibility.

This would enable mypy to check types of pyhocon objects before runtime.

tarmath commented 3 years ago

or alternatively drop support for python2 and simply add type hint inline? ;)