Skip to content

better types for django.cache #46

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

Closed
sbdchd opened this issue Aug 10, 2021 · 1 comment
Closed

better types for django.cache #46

sbdchd opened this issue Aug 10, 2021 · 1 comment

Comments

@sbdchd
Copy link
Owner

sbdchd commented Aug 10, 2021

https://docs.djangoproject.com/en/3.2/topics/cache/#basic-usage

Currently typed as Any, but we can do better:

from django.core.cache import cache
reveal_type(cache) # N: revealed type is Any
kodiakhq bot pushed a commit that referenced this issue Aug 11, 2021
We may need to loosen these, but as a default they should work pretty
well. Previously we typed the global cache as `Any`, but `BaseCache`
should work and has the various methods defined as well.

#46
@sbdchd
Copy link
Owner Author

sbdchd commented Aug 11, 2021

fixed in 0.8.0

@sbdchd sbdchd closed this as completed Aug 11, 2021
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

1 participant