Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feedback
  • Loading branch information
brianschubert committed Sep 5, 2025
commit b44e3be1c8710ef4ea35ea8baed425d858a44021
6 changes: 3 additions & 3 deletions mypyc/test-data/run-classes.test
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def test_classmethod_with_allow_interpreted() -> None:

[file interp.py]
def make_interpreted_subclass(base):
class Sub(base): # type: ignore
class Sub(base): # type: ignore[misc, valid-type]
@classmethod
def g(cls, x: int) -> int:
return x + 3
Expand Down Expand Up @@ -2473,7 +2473,7 @@ def test_interpreted_subclass() -> None:
from testutil import assertRaises

def define_interpreted_subclass(b):
class DerivedInterpreted1(b): # type: ignore
class DerivedInterpreted1(b): # type: ignore[misc, valid-type]
def __init__(self):
# Don't call base class __init__
pass
Expand All @@ -2486,7 +2486,7 @@ def define_interpreted_subclass(b):
with assertRaises(AttributeError):
del d1.x

class DerivedInterpreted2(b): # type: ignore
class DerivedInterpreted2(b): # type: ignore[misc, valid-type]
def __init__(self):
super().__init__('y')
d2 = DerivedInterpreted2()
Expand Down
21 changes: 10 additions & 11 deletions mypyc/test-data/run-singledispatch.test
Original file line number Diff line number Diff line change
Expand Up @@ -286,17 +286,16 @@ def build(n: int) -> Tree:
return Leaf()
return Node(n, build(n - 1), build(n - 1))

[file driver.py]
from native import build, calc_sum, equal
tree = build(5)
tree2 = build(5)
tree2.right.right.right.value = 10
assert calc_sum(tree) == 57
assert calc_sum(tree2) == 65
assert equal(tree, tree)
assert not equal(tree, tree2)
tree3 = build(4)
assert not equal(tree, tree3)
def test_sum_and_equal():
tree = build(5)
tree2 = build(5)
tree2.right.right.right.value = 10
assert calc_sum(tree) == 57
assert calc_sum(tree2) == 65
assert equal(tree, tree)
assert not equal(tree, tree2)
tree3 = build(4)
assert not equal(tree, tree3)

[case testSimulateMypySingledispatch]
from functools import singledispatch
Expand Down
Loading