mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
41 lines
714 B
HTML
41 lines
714 B
HTML
<html>
|
|
<body>
|
|
<p>Reports cases when not all abstract properties or methods are defined in
|
|
a subclass.</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
from abc import abstractmethod, ABC
|
|
|
|
|
|
class Figure(ABC):
|
|
|
|
@abstractmethod
|
|
def do_figure(self):
|
|
pass
|
|
|
|
|
|
class Triangle(Figure):
|
|
def do_triangle(self):
|
|
pass
|
|
</code></pre>
|
|
<p>When the quick-fix is applied, the IDE implements an abstract method for the <code>Triangle</code> class:</p>
|
|
<pre><code>
|
|
from abc import abstractmethod, ABC
|
|
|
|
|
|
class Figure(ABC):
|
|
|
|
@abstractmethod
|
|
def do_figure(self):
|
|
pass
|
|
|
|
|
|
class Triangle(Figure):
|
|
def do_figure(self):
|
|
pass
|
|
|
|
def do_triangle(self):
|
|
pass
|
|
</code></pre>
|
|
</body>
|
|
</html> |