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
We should consider making BaseCache Generic, so we can provide better type safety when relevant.
BaseCache
Code could then look something like this, with mypy checking:
cache: Cache[str] = Cache(...) await cache.get("foo") # -> str await cache.set("foo", "bar") # OK await cache.set("foo", 45) # Error: Expected str
Existing typing behaviour can be reproduced by annotating it with Cache[Any].
Cache[Any]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We should consider making
BaseCache
Generic, so we can provide better type safety when relevant.Code could then look something like this, with mypy checking:
Existing typing behaviour can be reproduced by annotating it with
Cache[Any]
.The text was updated successfully, but these errors were encountered: