error highlighting broken with assigned classes via methods
Brought to you by:
fabioz
I have a situation where I am assigning a class via a method:
class tests(unittest.TestCase):
def objectFactory(self):
return TestObject()
def test_CtrlOne(self):
testObject = self.objectFactory()
testObject.unimplementedMethod() <- no error highlighting here
pass
The current behavior is expected. PyDev will only check dotted names that complement an import (i.e.: not from a class). This is a current limitation of the code analysis.
Also, given the current code, it should say that TestObject is undefined, so, as it's not there, there wouldn't be a way to saying that unimplementedMethod is not part of a class that wasn't found in the first place (note that if it was found, if you did Ctrl+1 there, it should still be able to give a suggestion to create a method at that class).
If I misunderstood something there, please reopen this bug.