Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the typing_full hack #4158

Merged
merged 1 commit into from
Oct 25, 2017
Merged
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
Remove the typing_full hack
ilevkivskyi committed Oct 25, 2017
commit d206aec85835f66beb24aaedd44dcc97d53ac802
4 changes: 1 addition & 3 deletions mypy/semanal.py
Original file line number Diff line number Diff line change
@@ -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()