-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[requests] loosen HTTPError constructor #10776
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, we need one more change.
@@ -16,7 +16,7 @@ class JSONDecodeError(InvalidJSONError): ... | |||
class HTTPError(RequestException): | |||
request: Request | PreparedRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to add None
to request
.
Diff from mypy_primer, showing the effect of this PR on open source code: cloud-init (https://github.com/canonical/cloud-init)
- tests/unittests/sources/azure/test_errors.py:169: error: Missing named argument "request" for "HTTPError" [call-arg]
- tests/unittests/sources/azure/test_imds.py:64: error: Missing named argument "request" for "HTTPError" [call-arg]
- tests/unittests/sources/test_azure.py:343: error: Missing named argument "request" for "HTTPError" [call-arg]
paasta (https://github.com/yelp/paasta)
- paasta_tools/mesos_maintenance.py:213: error: Missing named argument "request" for "HTTPError" [call-arg]
apprise (https://github.com/caronc/apprise)
- test/helpers/rest.py:63: error: Missing named argument "request" for "HTTPError" [call-arg]
- test/test_attach_http.py:59: error: Missing named argument "request" for "HTTPError" [call-arg]
- test/test_config_http.py:54: error: Missing named argument "request" for "HTTPError" [call-arg]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Follow up on #10766, should help with #10764