Replies: 1 comment 1 reply
-
|
The docs were written before Quart supported Werkzeug's Responses - I'm actually thinking of trimming the docs to only refer to difference to Flask, but this is an aside. I would either cast or type: ignore in this case - I'm not sure of a better approach at the moment. |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
I have this code:
The make_response function returns either quart's Response or Werkzeug's Response. Only quart's Response has a timeout property.
Pyright thusly errors when it sees my code using response.timeout:
/workspaces/azure-search-openai-demo/app/backend/app.py:126:18 - error: Cannot assign member "timeout" for type "Response"
Member "timeout" is unknown (reportGeneralTypeIssues)
Should I always check if its an instance of quart's response before setting it, or is there a different approach? The doc examples all set timeout with no checks.
Beta Was this translation helpful? Give feedback.
All reactions