mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
GitOrigin-RevId: 4520138ac657a514b53f2f939521f0336701be46
25 lines
507 B
HTML
25 lines
507 B
HTML
<html>
|
|
<body>
|
|
<p>Reports when a method decorated with @override doesn't have a matching method in its ancestor classes</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
from typing import override
|
|
|
|
class Parent:
|
|
def foo(self) -> int:
|
|
return 1
|
|
|
|
def bar(self, x: str) -> str:
|
|
return x
|
|
|
|
class Child(Parent):
|
|
@override
|
|
def foo(self) -> int:
|
|
return 2
|
|
|
|
@override # Missing super method for override function
|
|
def baz(self) -> int:
|
|
return 1
|
|
</code></pre>
|
|
</body>
|
|
</html> |