Skip to content

Commit 388ba2a

Browse files
committed
just ignore
1 parent c8b23ac commit 388ba2a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

mypy/erasetype.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def visit_unpack_type(self, t: UnpackType) -> ProperType:
101101
def visit_callable_type(self, t: CallableType) -> ProperType:
102102
# We must preserve the fallback type for overload resolution to work.
103103
any_type = AnyType(TypeOfAny.special_form)
104+
# If we're a type object, make sure we continue to be a valid type object
104105
ret_type = t.ret_type if t.is_type_obj() else any_type
105106
return CallableType(
106107
arg_types=[any_type, any_type],

mypy/test/testtypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ def test_erase_with_type_object(self) -> None:
333333
arg_types=[self.fx.anyt, self.fx.anyt],
334334
arg_kinds=[ARG_STAR, ARG_STAR2],
335335
arg_names=[None, None],
336-
ret_type=self.fx.anyt,
336+
ret_type=self.fx.b,
337337
fallback=self.fx.type_type,
338338
),
339339
)

0 commit comments

Comments
 (0)