Skip to content

Commit 2a80c35

Browse files
fix all of the test fixture complaints
1 parent f1a4650 commit 2a80c35

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

test-data/unit/check-flags.test

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,37 +2477,39 @@ class Parent:
24772477
def f(self, x: int) -> None:
24782478
pass
24792479

2480-
def g(self, y: int) -> bool:
2481-
return True
2480+
def g(self, y: int) -> None:
2481+
pass
24822482

24832483
class Child(Parent):
24842484
def f(self, x: int) -> None: # E: Method "f" is not using @override but is overriding a method in class "__main__.Parent"
24852485
pass
24862486

24872487
@override
2488-
def g(self, y: int) -> bool: #type: ignore # E: Unused "type: ignore" comment # E: "type: ignore" comment without error code
2489-
return True
2488+
def g(self, y: int) -> None: #type: ignore # E: Unused "type: ignore" comment # E: "type: ignore" comment without error code
2489+
pass
24902490
[builtins fixtures/tuple-simple.pyi]
24912491

24922492
[case testSpotCheckErrorCodeAllNotUsed]
24932493
# This test case exists purely to ensure that the testSpotCheckErrorCodeAll test does not become obsolete.
24942494
# (For example, if all the errors expected by testSpotCheckErrorCodeAll get turned on by default, then
2495-
# the testSpotCheckErrorCodeAll test would fail to guarantee the enablement of any additional errors!)
2495+
# the testSpotCheckErrorCodeAll test would fail to guarantee the enablement of any additional errors!
2496+
# (hint: if that does happen, breaking this test, then consider changing these two tests to pick *different*,
2497+
# not-enabled-by-default, error codes.))
24962498

24972499
from typing_extensions import override
24982500

24992501
class Parent:
25002502
def f(self, x: int) -> None:
25012503
pass
25022504

2503-
def g(self, y: int) -> bool:
2504-
return True
2505+
def g(self, y: int) -> None:
2506+
pass
25052507

25062508
class Child(Parent):
25072509
def f(self, x: int) -> None:
25082510
pass
25092511

25102512
@override
2511-
def g(self, y: int) -> bool: #type: ignore
2512-
return True
2513+
def g(self, y: int) -> None: #type: ignore
2514+
pass
25132515
[builtins fixtures/tuple-simple.pyi]

test-data/unit/fixtures/tuple-simple.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ class function: pass
1919
class int: pass
2020
class str: pass # For convenience
2121
class dict: pass
22+
23+
# Had to define this testSpotCheckErrorCodeAll*, for whatever reason:
24+
class ellipsis: pass

0 commit comments

Comments
 (0)