mypy Type Checking #440
Unanswered
mariuspruvot
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I’m encountering a type checking issue with mypy when using the @cache decorator from the fastapi_cache library. The decorator seems to be causing a type mismatch error with methods that return a dictionary.
Here’s an example illustrating the problem:
After applying the @cache decorator, mypy reports an error similar to:
Is there a known solution or recommended practice to handle this type of issue with mypy and fastapi_cache? Any advice on how to ensure type consistency and resolve this error would be greatly appreciated.
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions