Monday, 25 November 2019

PyCharm: autocomplete on "self...." does not work since with_metaclass() gets used

Since we use with_metaclass() PyCharm does not detect the super-class any more.

New code (autocomplete does not work):

class EditTestCase(with_metaclass(EditTestCaseMeta, EditTestCaseMixin, unittest.TestCase)):
    ....

Old code (autocomplete worked):

class EditTestCase(EditTestCaseMixin, unittest.TestCase):
    __metaclass__ = EditTestCaseMeta
    ....

Code needs to support Python2.7 and Python3



from PyCharm: autocomplete on "self...." does not work since with_metaclass() gets used

No comments:

Post a Comment