-
Notifications
You must be signed in to change notification settings - Fork 1
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
[GCP-5538] Storage: Missing support for HTTP Headers and Query String Parameters #17
base: master
Are you sure you want to change the base?
Conversation
blob_or_uri.download_to_file(file_obj, client=self, start=start, end=end) | ||
blob_or_uri.download_to_file( | ||
file_obj, client=self, start=start, end=end, query_params=query_params | ||
) |
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.
This repeats lines 402-404. Is there any way to check the type and validate the blob_or_uri
parameter before the try...except
clause and avoid an unnecessary API call?
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.
I have only added query_params parameter not added try..except and is it fine to change their usecase?
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.
It should be fine as long as two API calls were there initially, I just thought we could improve on that too, along the way.
client=client, | ||
start=start, | ||
end=end, | ||
query_params=query_params, |
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.
Remove the extra "comma" after query params.
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.
if i remove "comma" than blacken test failed, you can see also in client.py that added "comma" after client parameter
client=client, | ||
start=start, | ||
end=end, | ||
query_params=query_params, |
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.
Remove extra comma.
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.
Same as above
size, | ||
num_retries, | ||
predefined_acl, | ||
extra_headers, |
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.
Remove "comma" after extra_headers.
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.
same as above
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.
LGTM
Nevertheless I'm really advising to follow @mf2199 advises about custom
spelling.
Yes , i did that, but i followed docs url where i found |
blob_or_uri.download_to_file(file_obj, client=self, start=start, end=end) | ||
blob_or_uri.download_to_file( | ||
file_obj, client=self, start=start, end=end, query_params=query_params | ||
) |
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.
It should be fine as long as two API calls were there initially, I just thought we could improve on that too, along the way.
Addressing #5538