-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Unexpected typecheck failures with redis.asyncio type stubs #7837
Labels
stubs: false positive
Type checkers report false errors
Comments
4 tasks
All of your errors are explained here: #7597 (comment) |
I've updated $ python -m mypy aiohttp_session
aiohttp_session/redis_storage.py:62: error: Incompatible types in "await" (actual type "Optional[bytes]", expected type "Awaitable[Any]") [misc]
aiohttp_session/redis_storage.py:87: error: Incompatible types in "await" (actual type "Optional[bool]", expected type "Awaitable[Any]") [misc]
Found 2 errors in 1 file (checked 6 source files) |
With $ python -m mypy aiohttp_session
aiohttp_session/redis_storage.py:65: error: Incompatible types in assignment (expression has type "str", variable has type "Optional[bytes]") [assignment]
aiohttp_session/redis_storage.py:67: error: Argument 1 has incompatible type "bytes"; expected "str" [arg-type]
aiohttp_session/redis_storage.py:70: error: Argument "data" to "Session" has incompatible type "Optional[bytes]"; expected "Optional[SessionData]" [arg-type]
Found 3 errors in 1 file (checked 6 source files) |
Ah, I could fix the above type errors in the aiohttp-session side. |
Brilliant, thanks for checking! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Happens with:
import aioredis
withfrom redis import asyncio as aioredis
(ghaction check result)All the related codes run fine at runtime.
The text was updated successfully, but these errors were encountered: