If code has annotations, it would be nice if stubgen would preserve them instead of filtering them out. Example (input -> output): ``` from mod import Thing import mod2 def f(x: Thing) -> int: mod2.do_stuff() # more implementation ``` -> ``` from mod import Thing def f(x: Thing) -> int: ... ``` 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.
Activity
yoongu commentedon Nov 5, 2016
It would be super helpful to us if this got implemented!
Stubgen improvements: preserving existing annotations (#3169)
ilevkivskyi commentedon Sep 22, 2017
This is now implemented in #3169.