Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def merge(
_user_request_options = user_request_options

for key, value in _user_request_options.items():
request_options[key].update(value)
if request_options[key] is None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L68 there's a default for the None parameters, maybe do the same for data?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hesitant because in other languages, if there are data set in the request options, we overwrite the original object.
It's not the case in python (yet), but I thought it was more safe to handle it carefully that way, to prevent any misbehaviour if we make the code more consistent with the other languages in the future

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we will go to that level of consistency honestly it seems too much but your solution works as well so i'm good with it!

request_options[key] = value
else:
request_options[key].update(value)

return self.from_dict(request_options)