Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions mypyc/test-data/fixtures/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __ne__(self, x: object) -> bool: pass
class type:
def __init__(self, o: object) -> None: ...
def __or__(self, o: object) -> Any: ...
def __new__(cls, *args: object) -> Any: ...
__name__ : str
__annotations__: Dict[str, Any]

Expand Down
8 changes: 4 additions & 4 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):
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):
class DerivedInterpreted1(b): # type: ignore[misc, valid-type]
def __init__(self):
# Don't call base class __init__
pass
Expand All @@ -2486,10 +2486,10 @@ def define_interpreted_subclass(b):
with assertRaises(AttributeError):
del d1.x

class DerivedInterpreted1(b):
class DerivedInterpreted2(b): # type: ignore[misc, valid-type]
def __init__(self):
super().__init__('y')
d2 = DerivedInterpreted1()
d2 = DerivedInterpreted2()
assert d2.x == 5
assert d2.s == 'y'
with assertRaises(AttributeError):
Expand Down
1 change: 1 addition & 0 deletions mypyc/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) ->
options.preserve_asts = True
options.allow_empty_bodies = True
options.incremental = self.separate
options.check_untyped_defs = True

# Avoid checking modules/packages named 'unchecked', to provide a way
# to test interacting with code we don't have types for.
Expand Down
Loading