Enable mypy checking for unreachable code and fix instances. (#8432)

This commit is contained in:
Patrick Cloke 2020-10-01 08:09:18 -04:00 committed by GitHub
parent c1ef579b63
commit 4ff0201e62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 38 additions and 53 deletions

View file

@ -257,7 +257,7 @@ class _AsyncResource(resource.Resource, metaclass=abc.ABCMeta):
if isinstance(raw_callback_return, (defer.Deferred, types.CoroutineType)):
callback_return = await raw_callback_return
else:
callback_return = raw_callback_return
callback_return = raw_callback_return # type: ignore
return callback_return
@ -406,7 +406,7 @@ class JsonResource(DirectServeJsonResource):
if isinstance(raw_callback_return, (defer.Deferred, types.CoroutineType)):
callback_return = await raw_callback_return
else:
callback_return = raw_callback_return
callback_return = raw_callback_return # type: ignore
return callback_return