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
This PR modifies heavily the stubgen to be able to create better stubs
when processing already annotated files (Implements #2106 ).
It essentially adds annotations on the stubs for:
* Variables/attributes with annotations
* Annotations on functions/methods
* TypeVar declarations
* Type Aliases
It also adds some fixes (handling of generics as base classes,
some formatting fixes in the output) that were natural consequences
of some of the refactoring I made.
If code has annotations, it would be nice if stubgen would preserve them instead of filtering them out. Example (input -> output):
->
Maybe we should also (optionally) run type inference so that we could output inferred types for module-level variables and attributes.
See also discussion in #1899.
The text was updated successfully, but these errors were encountered: