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

mypy thinks sadd is not awaitable #3195

Open
gergelypolonkai opened this issue Mar 28, 2024 · 2 comments
Open

mypy thinks sadd is not awaitable #3195

gergelypolonkai opened this issue Mar 28, 2024 · 2 comments

Comments

@gergelypolonkai
Copy link

Version: 5.0.3

Platform: Python 3.12 on Fedora 39, using Redis 7.2.4

Description: When linting the following line with MyPy, it reports an incompatible type.

from redis.asyncio import from_url

r = from_url("redis://localhost")

await r.sadd("key", "value")
test.py:5: error: Incompatible types in "await" (actual type "Awaitable[int] | int", expected type "Awaitable[Any]")  [misc]

Using set, get, incrby, etc. doesn’t trigger this error.

@haok1402
Copy link

sismember also got the same problem.

@mattwang44
Copy link
Contributor

duplicated issue #2399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants