Reputation: 487
Is there a smart way to find and implement all the abstract methods in PyCharm Community Edition?
I've found there's a "Implement methods (Ctrl+I)", but it's always been disabled.
For example:
class Base():
@abstractmethod
def abstract1(self):
raise NotImplementedError
@abstractmethod
def abstract2(self):
raise NotImplementedError
def method1(self):
print("ok")
If I write a sub class, is there a smart way to implement abstract1
and abstract2
in my sub class, but not method1
?
Because I found use Ctrl+O will need to read the source before.
Upvotes: 4
Views: 1739
Reputation: 7639
Definition of subclass would be highlighted as below.
Use Alt+Enter
on class name to call intention that will suggest methods to implement.
There is an issue for Implement Methods..
action, please vote for it.
Upvotes: 4