Skip to content

Commit 78d9699

Browse files
committed
Enable calling uninhabited as well
1 parent 3b86a34 commit 78d9699

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypy/checkexpr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1671,6 +1671,10 @@ def check_call(
16711671
object_type,
16721672
original_type=callee,
16731673
)
1674+
elif isinstance(callee, UninhabitedType):
1675+
ret = UninhabitedType()
1676+
ret.ambiguous = callee.ambiguous
1677+
return callee, ret
16741678
else:
16751679
return self.msg.not_callable(callee, context), AnyType(TypeOfAny.from_error)
16761680

0 commit comments

Comments
 (0)