From d206aec85835f66beb24aaedd44dcc97d53ac802 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 25 Oct 2017 10:20:39 +0200 Subject: [PATCH] Remove the typing_full hack --- mypy/semanal.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mypy/semanal.py b/mypy/semanal.py index 2d4b3c5b923c..283077a60763 100644 --- a/mypy/semanal.py +++ b/mypy/semanal.py @@ -417,9 +417,7 @@ def visit_func_def(self, defn: FuncDef) -> None: # A coroutine defined as `async def foo(...) -> T: ...` # has external return type `Awaitable[T]`. ret_type = self.named_type_or_none('typing.Awaitable', [defn.type.ret_type]) - if ret_type is None: - # We are running tests. - ret_type = self.named_type('typing_full.Awaitable', [defn.type.ret_type]) + assert ret_type is not None, "Internal error: typing.Awaitable not found" defn.type = defn.type.copy_modified(ret_type=ret_type) self.errors.pop_function()