-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat: Add two generation config flags to raise exceptions #744
base: main
Are you sure you want to change the base?
feat: Add two generation config flags to raise exceptions #744
Commits on Apr 1, 2023
-
fix: Make empty response a
NoneProperty
We know the type of this: It's `None`, so we don't need to annotate it as `Any`.
Configuration menu - View commit details
-
Copy full SHA for 9df04c9 - Browse repository at this point
Copy the full SHA 9df04c9View commit details -
fix: Do not cast() unnecessarily
cast(None, None) made mypy fail after that last commit.
Configuration menu - View commit details
-
Copy full SHA for 43f3a4c - Browse repository at this point
Copy the full SHA 43f3a4cView commit details -
feat: Parse JSON responses without schema
It makes sense to return the parsed JSON here instead of None.
Configuration menu - View commit details
-
Copy full SHA for 1186955 - Browse repository at this point
Copy the full SHA 1186955View commit details -
fix: Ignore mypy error when returning None
This was introduced in "fix: Make empty response a `NoneProperty`", but is easier to fix now since parsed_responses in endpoint_module.py.jinja does not include `Any` response types anymore.
Configuration menu - View commit details
-
Copy full SHA for 5a75e3d - Browse repository at this point
Copy the full SHA 5a75e3dView commit details -
fix: Add None to Response[] generic type
Also prevents double return type annotations like `Optional[None]`.
Configuration menu - View commit details
-
Copy full SHA for 01908a5 - Browse repository at this point
Copy the full SHA 01908a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for afa1de3 - Browse repository at this point
Copy the full SHA afa1de3View commit details -
feat: Add two generation config flags to raise exceptions
raise_on_error_status raises a `httpx.HTTPStatusError` on all error response codes without decoding. raise_on_unexpected_status is identical to the existing `Client.raise_on_unexpected_status` runtime setting, but leads to better return type annotations.
Configuration menu - View commit details
-
Copy full SHA for 4e213e6 - Browse repository at this point
Copy the full SHA 4e213e6View commit details