We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
method: Optional[Callable[[], Awaitable[StreamResponse]]] method = getattr(self, self.request.method.lower(), None) reveal_type(method)
aiohttp/web_urldispatcher.py:934: note: Revealed type is "Union[Any, None]"
vs.
method: Optional[Callable[[], Awaitable[StreamResponse]]] = getattr( self, self.request.method.lower(), None) reveal_type(method)
aiohttp/web_urldispatcher.py:934: note: Revealed type is "Union[def () -> typing.Awaitable[aiohttp.web_response.StreamResponse], None]"
Expectation is that both versions should have the same type (and not be Any).
Any
Tested with mypy 0.930.
Full code at: https://github.com/aio-libs/aiohttp/pull/6452/files#diff-9632858c8fdd45d817126b2735f763b9a2e24fb2800122eb2cb0c9a3b89c85c1
The text was updated successfully, but these errors were encountered:
Mypy doesn't currently apply narrowing to assignments if the assignment occurs on the same line as the type annotation.
This is a duplicate of #2008.
Sorry, something went wrong.
No branches or pull requests
vs.
Expectation is that both versions should have the same type (and not be
Any
).Tested with mypy 0.930.
Full code at: https://github.com/aio-libs/aiohttp/pull/6452/files#diff-9632858c8fdd45d817126b2735f763b9a2e24fb2800122eb2cb0c9a3b89c85c1
The text was updated successfully, but these errors were encountered: