Reputation: 1514
Code
class A(object):
def a(self):
raise NotImplementedError
class B(A):
def a(self):
return 7
class C(B):
pass
Why does Pycharm complain?
Problem synopsis Class C must implement all abstract methods
Upvotes: 33
Views: 27149
Reputation: 3396
I find that warning relevant, so I would not disable it globally. You can instrument a false positive (erroneous warning) with # noqa
and it should silence the PyCharm warning:
class MySerializer(serializers.Serializer): # noqa
pass
note: I have not found a narrower warning/error code.
Upvotes: 19
Reputation: 896
We can disable this warning as follows:
Upvotes: 8
Reputation: 1773
As expected, python itself recognises that instances of Class C are valid. So I suspected an bug in PyCharm.
Googling for PyCharm Bug Tracker got me to https://youtrack.jetbrains.com/issues/PY
Sure enough a ticket has been raised. https://youtrack.jetbrains.com/issue/PY-16132
No fix yet
Upvotes: 4
Reputation: 34086
It's a reported bug - you can vote for it here: https://youtrack.jetbrains.com/issue/PY-16132
Upvotes: 34