pyhocon icon indicating copy to clipboard operation
pyhocon copied to clipboard

Generate PEP-484 Stub Files to enable mypy checking

Open mjmeehan opened this issue 5 years ago • 1 comments

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.

mjmeehan avatar Aug 09 '19 12:08 mjmeehan

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

tarmath avatar Dec 17 '20 21:12 tarmath