Skip to content

Commit d12d32c

Browse files
ilevkivskyigvanrossum
authored andcommitted
Remove the typing_full hack (#4158)
1 parent 936ceac commit d12d32c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mypy/semanal.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,7 @@ def visit_func_def(self, defn: FuncDef) -> None:
417417
# A coroutine defined as `async def foo(...) -> T: ...`
418418
# has external return type `Awaitable[T]`.
419419
ret_type = self.named_type_or_none('typing.Awaitable', [defn.type.ret_type])
420-
if ret_type is None:
421-
# We are running tests.
422-
ret_type = self.named_type('typing_full.Awaitable', [defn.type.ret_type])
420+
assert ret_type is not None, "Internal error: typing.Awaitable not found"
423421
defn.type = defn.type.copy_modified(ret_type=ret_type)
424422
self.errors.pop_function()
425423

0 commit comments

Comments
 (0)