The following forum message was posted by at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4388159:
Is there a way to hint PyDev what is the type a variable (or property) so it
can provide autocompletion?
def __init__(self, p):
self.p = p #@type self.p: module.AnotherClass
self.p. # autocompletion for AnotherClass opens
The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4388159:
You can use an isinstance assert to check it...
E.g.: assert isinstance(p, module.AnotherClass)
but it won't work for your use-case (pydev will be able to resolve p in the
same scope where the isinstance was used, but can't 'see' that self.p was of
the same type that p (which had the assert used).
Please add a feature request for that.