Skip to content

Commit b44e3be

Browse files
committed
feedback
1 parent b2fd506 commit b44e3be

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

mypyc/test-data/run-classes.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ def test_classmethod_with_allow_interpreted() -> None:
811811

812812
[file interp.py]
813813
def make_interpreted_subclass(base):
814-
class Sub(base): # type: ignore
814+
class Sub(base): # type: ignore[misc, valid-type]
815815
@classmethod
816816
def g(cls, x: int) -> int:
817817
return x + 3
@@ -2473,7 +2473,7 @@ def test_interpreted_subclass() -> None:
24732473
from testutil import assertRaises
24742474

24752475
def define_interpreted_subclass(b):
2476-
class DerivedInterpreted1(b): # type: ignore
2476+
class DerivedInterpreted1(b): # type: ignore[misc, valid-type]
24772477
def __init__(self):
24782478
# Don't call base class __init__
24792479
pass
@@ -2486,7 +2486,7 @@ def define_interpreted_subclass(b):
24862486
with assertRaises(AttributeError):
24872487
del d1.x
24882488

2489-
class DerivedInterpreted2(b): # type: ignore
2489+
class DerivedInterpreted2(b): # type: ignore[misc, valid-type]
24902490
def __init__(self):
24912491
super().__init__('y')
24922492
d2 = DerivedInterpreted2()

mypyc/test-data/run-singledispatch.test

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -286,17 +286,16 @@ def build(n: int) -> Tree:
286286
return Leaf()
287287
return Node(n, build(n - 1), build(n - 1))
288288

289-
[file driver.py]
290-
from native import build, calc_sum, equal
291-
tree = build(5)
292-
tree2 = build(5)
293-
tree2.right.right.right.value = 10
294-
assert calc_sum(tree) == 57
295-
assert calc_sum(tree2) == 65
296-
assert equal(tree, tree)
297-
assert not equal(tree, tree2)
298-
tree3 = build(4)
299-
assert not equal(tree, tree3)
289+
def test_sum_and_equal():
290+
tree = build(5)
291+
tree2 = build(5)
292+
tree2.right.right.right.value = 10
293+
assert calc_sum(tree) == 57
294+
assert calc_sum(tree2) == 65
295+
assert equal(tree, tree)
296+
assert not equal(tree, tree2)
297+
tree3 = build(4)
298+
assert not equal(tree, tree3)
300299

301300
[case testSimulateMypySingledispatch]
302301
from functools import singledispatch

0 commit comments

Comments
 (0)