Type Hinting should try to use @type
Brought to you by:
fabioz
But here to illustrate how I'd expect it to work
class MyClass(object):
fields = None
"""Some fields
@type: dict
"""
a = MyClass()
a.fields. # Now it should show me dict type's auto completions
This would be particularly helpful for Django which uses extensively metaclasses and properties that are of "unknown" type like CharField, OneToOneField, ForeignKey, ...
(This is old request, and once discussed here http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4388159 )
I must note that in Django the @type for instance should take precedence of *other* methods of discovering type.
So perhaps @type should have higher precedence than other ways of discovering type?
Another note about Django is that there could be some more pluggable way of adding type hintings.
For instance I would add a very simple type hinting for Django, if class name is "CharField" -> string, OneToOneField + first parameter -> Model etc...