Skip to content

Commit b0b1902

Browse files
committed
test fixes
1 parent e22f1f5 commit b0b1902

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

test-data/unit/check-functions.test

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,11 +3074,11 @@ class B(A):
30743074

30753075
class C(A):
30763076
@overload
3077-
def f(self, y: int) -> str: pass
3077+
def f(self, x: int) -> str: pass
30783078
@override
30793079
@overload
3080-
def f(self, y: str) -> str: pass
3081-
def f(self, y: int | str) -> str: pass
3080+
def f(self, x: str) -> str: pass
3081+
def f(self, x: int | str) -> str: pass
30823082
[typing fixtures/typing-override.pyi]
30833083

30843084
[case explicitOverrideOnMultipleOverloads]
@@ -3099,12 +3099,12 @@ class B(A):
30993099

31003100
class C(A):
31013101
@overload
3102-
def f(self, y: int) -> str: pass
3102+
def f(self, x: int) -> str: pass
31033103
@override
31043104
@overload
3105-
def f(self, y: str) -> str: pass
3105+
def f(self, x: str) -> str: pass
31063106
@override
3107-
def f(self, y: int | str) -> str: pass
3107+
def f(self, x: int | str) -> str: pass
31083108
[typing fixtures/typing-override.pyi]
31093109

31103110
[case explicitOverrideCyclicDependency]
@@ -3142,13 +3142,13 @@ class A:
31423142

31433143
class B(A):
31443144
@override
3145-
def f(self, y: int) -> str: pass
3145+
def f(self, x: int) -> str: pass
31463146

31473147
class C(A):
3148-
def f(self, y: int) -> str: pass # E: Method "f" is not using @override but is overriding a method in class "__main__.A"
3148+
def f(self, x: int) -> str: pass # E: Method "f" is not using @override but is overriding a method in class "__main__.A"
31493149

31503150
class D(B):
3151-
def f(self, y: int) -> str: pass # E: Method "f" is not using @override but is overriding a method in class "__main__.B"
3151+
def f(self, x: int) -> str: pass # E: Method "f" is not using @override but is overriding a method in class "__main__.B"
31523152
[typing fixtures/typing-override.pyi]
31533153

31543154
[case requireExplicitOverrideSpecialMethod]
@@ -3221,26 +3221,26 @@ class A:
32213221

32223222
class B(A):
32233223
@overload
3224-
def f(self, y: int) -> str: ...
3224+
def f(self, x: int) -> str: ...
32253225
@overload
3226-
def f(self, y: str) -> str: ...
3226+
def f(self, x: str) -> str: ...
32273227
@override
3228-
def f(self, y): pass
3228+
def f(self, x): pass
32293229

32303230
class C(A):
32313231
@overload
32323232
@override
3233-
def f(self, y: int) -> str: ...
3233+
def f(self, x: int) -> str: ...
32343234
@overload
3235-
def f(self, y: str) -> str: ...
3236-
def f(self, y): pass
3235+
def f(self, x: str) -> str: ...
3236+
def f(self, x): pass
32373237

32383238
class D(A):
32393239
@overload
3240-
def f(self, y: int) -> str: ...
3240+
def f(self, x: int) -> str: ...
32413241
@overload
3242-
def f(self, y: str) -> str: ...
3243-
def f(self, y): pass # E: Method "f" is not using @override but is overriding a method in class "__main__.A"
3242+
def f(self, x: str) -> str: ...
3243+
def f(self, x): pass # E: Method "f" is not using @override but is overriding a method in class "__main__.A"
32443244
[typing fixtures/typing-override.pyi]
32453245

32463246
[case requireExplicitOverrideMultipleInheritance]
@@ -3250,14 +3250,14 @@ from typing import override
32503250
class A:
32513251
def f(self, x: int) -> str: pass
32523252
class B:
3253-
def f(self, y: int) -> str: pass
3253+
def f(self, x: int) -> str: pass
32543254

32553255
class C(A, B):
32563256
@override
3257-
def f(self, z: int) -> str: pass
3257+
def f(self, x: int) -> str: pass
32583258

32593259
class D(A, B):
3260-
def f(self, z: int) -> str: pass # E: Method "f" is not using @override but is overriding a method in class "__main__.A"
3260+
def f(self, x: int) -> str: pass # E: Method "f" is not using @override but is overriding a method in class "__main__.A"
32613261
[typing fixtures/typing-override.pyi]
32623262

32633263
[case testExplicitOverrideAllowedForPrivate]

test-data/unit/check-super.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class A:
237237
def f(self, s: str) -> None: pass
238238

239239
class B(A):
240-
def f(self, i: Union[int, str]) -> None: pass
240+
def f(self, s: Union[int, str]) -> None: pass
241241

242242
class C:
243243
def g(self, b: B) -> None:
@@ -251,7 +251,7 @@ class A:
251251
def f(self, s: str) -> None: pass
252252

253253
class B(A):
254-
def f(self, i: Union[int, str]) -> None: pass
254+
def f(self, s: Union[int, str]) -> None: pass
255255

256256
def g(b: B) -> None:
257257
super(B, b).f('42')

0 commit comments

Comments
 (0)