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

Jason L Connor jconnor at redhat.com
Mon Oct 3 08:49:55 MDT 2011


On Sat, 2011-10-01 at 17:05 +0200, Linos wrote:
> 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.
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide

A good alternative is to have wingide parse and understand epydoc and/or
restructured text docstrings. That way the idea could fall back to
looking at the return type in those formats.

-- 
Jason L Connor
linear on freenode #pulp
http://pulpproject.org/
RHCE: 805010912355231
GPG Fingerprint: 2048R/CC4ED7C1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
Url : /pipermail/wingide-users/attachments/20111003/08fbaddf/attachment.bin


More information about the wingide-users mailing list