Stone should generate `#type` declarations for generated Python code
posita opened this issue · 2 comments
posita commented
Currently, when targeting Python, Stone does not add #type
declarations to generated code. I don't know how difficult this would be, but it probably should.
wittekm commented
Hi! Stone does this, actually, using PEP 484 .pyi files - they are separate files that define the types, but otherwise behave exactly like # type:
annotations.
Try out the python_type_stubs
generator.
Example: https://github.com/dropbox/stone/blob/master/test/test_python_type_stubs.py