File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ def method2(self, x: str) -> str:
49
49
def method2 (self , x : int | str ) -> int | str : # OK
50
50
return 0
51
51
52
- @override
53
- def method3 (self ) -> int : # E: no matching signature in ancestor
52
+ @override # E[method3]
53
+ def method3 (self ) -> int : # E[method3] : no matching signature in ancestor
54
54
return 1
55
55
56
56
@overload # E[method4]
@@ -61,7 +61,7 @@ def method4(self, x: int) -> int:
61
61
def method4 (self , x : str ) -> str :
62
62
...
63
63
64
- @override
64
+ @override # E[method4]
65
65
def method4 (self , x : int | str ) -> int | str : # E[method4]: no matching signature in ancestor
66
66
return 0
67
67
@@ -75,18 +75,18 @@ def method5(self): # OK
75
75
# > only normal methods but also @property, @staticmethod, and @classmethod.
76
76
77
77
@staticmethod
78
- @override
79
- def static_method1 () -> int : # E: no matching signature in ancestor
78
+ @override # E[static_method1]
79
+ def static_method1 () -> int : # E[static_method1] : no matching signature in ancestor
80
80
return 1
81
81
82
82
@classmethod
83
- @override
84
- def class_method1 (cls ) -> int : # E: no matching signature in ancestor
83
+ @override # E[class_method1]
84
+ def class_method1 (cls ) -> int : # E[class_method1] : no matching signature in ancestor
85
85
return 1
86
86
87
87
@property
88
- @override
89
- def property1 (self ) -> int : # E: no matching signature in ancestor
88
+ @override # E[property1]
89
+ def property1 (self ) -> int : # E[property1] : no matching signature in ancestor
90
90
return 1
91
91
92
92
You can’t perform that action at this time.
0 commit comments