You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.enaml files appear completely opaques to most tools and while we cannot do much in a generic sense we could improve the user experience inside Python files using definition found in an enaml file by providing .pyi for enaml files.
The generation could be made from the AST generated by the parser:
for Python blocks we could empty the body of function nodes and simply unparse the AST (auto formatting after could handle messed up line numbers)
for enamldef we could use a class and generate type annotations for attr, aliases, and event and copy the annotations of declarative func. For attr, enaml syntax already has a type annotation, for aliases we would need to resolve to what the alias point to and if it is an atom member we should recover the matching type useful in an annotation, for event we would simply use the atom member
for template something similar could work too but it will need more thoughts
The text was updated successfully, but these errors were encountered:
.enaml files appear completely opaques to most tools and while we cannot do much in a generic sense we could improve the user experience inside Python files using definition found in an enaml file by providing .pyi for enaml files.
The generation could be made from the AST generated by the parser:
The text was updated successfully, but these errors were encountered: