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.
Cheers,
Fabio
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way to hint PyDev what is the type a variable (or property) so it can provide autocompletion?
Regards,
Emil
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.
Cheers,
Fabio