[wingide-users] Feature request: manual inline type annotation

Linos info at linos.es
Sat Oct 1 09:05:14 MDT 2011


Hi,
	to be frank i am not sure if something like this it is supported already in
WingIDE but i would find incredible useful.

Many times i have a method that receives objects as parameters or i assign a
variable to the return of other object method implemented in different modules
that WingIDE can't find the type so i lost autocomplete and source assistant
features, would be great that when this happen i could help Wing to determine
the type of the variable.

i have used in the past .pi files but don't know if i can use to define the
types of variables inside classes methods and if it is a good idea anyway, i
would prefer something inline. I have checked the standard function annotations
in Python3 but i am still in Python2 and this would not help with the second
case anyway.

I am not sure what syntax would be fine but something like epydoc or numpydoc
would be probably fine for functions and methods and for variables something
commented after the variable?

new_object = other_module.other_class.getOBject() #@type new_object:
other_module.other_type

Any comments?

Regards,
Miguel Angel.


More information about the wingide-users mailing list