-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update mypy to latest version and support mypy --strict #3927
Comments
(I'll try to fix at least a part of this) |
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
- Add type annotations to global variables - Fix handling of unused return values from time.gmtime - Silence mypy error on return line (it's not yet capable of deducing that _cached_formatted_datetime is always defined at the end of the function)
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
(MatchObject.lastindex may be None)
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]") Not sure how to fix, may be a typeshed problem
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
Not sure how to fix this properly, the logic is hard to follow
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
- Don't reuse variable to decomplicate logic - Silence error at return line as mypy cannot deduce that result cannot be Awaitable after the 'if'
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]") Not sure how to fix, may be a typeshed problem
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
Not sure how to fix this properly, the logic is hard to follow
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Jul 22, 2019
- Don't reuse variable to decomplicate logic - Silence error at return line as mypy cannot deduce that result cannot be Awaitable after the 'if'
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
- Add type annotations to global variables - Fix handling of unused return values from time.gmtime - Silence mypy error on return line (it's not yet capable of deducing that _cached_formatted_datetime is always defined at the end of the function)
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
(MatchObject.lastindex may be None)
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]") Not sure how to fix, may be a typeshed problem
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 1, 2019
Not sure how to fix this properly, the logic is hard to follow
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
- Add type annotations to global variables - Fix handling of unused return values from time.gmtime - Silence mypy error on return line (it's not yet capable of deducing that _cached_formatted_datetime is always defined at the end of the function)
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
(MatchObject.lastindex may be None)
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]") Not sure how to fix, may be a typeshed problem
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
Not sure how to fix this properly, the logic is hard to follow
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]") Not sure how to fix, may be a typeshed problem
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
Not sure how to fix this properly, the logic is hard to follow
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
...by moving field type annotation to class definition
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
error: Incompatible types in "await" (actual type "Generator[Any, None, AbstractServer]", expected type "Awaitable[Any]") Not sure how to fix, may be a typeshed problem
AMDmi3
added a commit
to AMDmi3/aiohttp
that referenced
this issue
Aug 13, 2019
Not sure how to fix this properly, the logic is hard to follow
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Long story short
Following discussion in #3868, here's an issue to track a progress of cleaning up errors reported by newer mypy and/or mypy in strict mode.
Expected behaviour
aiohttp is clean with latest mypy (0.720 ATOW) in
--strict
mode.Actual behaviour
There are some errors after updating mypy, and a lot of errors after enabling strict mode.
Steps to reproduce
Run
mypy --strict aiohttp
with latest mypyYour environment
FreeBSD 12.0 amd64, python 3.7, mypy 0.720
The text was updated successfully, but these errors were encountered: