-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Port gax helper methods #4249
Port gax helper methods #4249
Conversation
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.
Looks mostly good, a few tiny nits. Thank you for doing this.
"""Raise ValueError if more than one keyword argument is not none. | ||
Args: | ||
kwargs (dict): The keyword arguments sent to the function. | ||
Returns: None |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
""" | ||
# Sanity check: If no keyword arguments were sent, this is fine. | ||
if not kwargs: | ||
return None |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
assert protobuf_helpers.check_oneof(foo='bar') is None | ||
assert protobuf_helpers.check_oneof(foo='bar', baz=None) is None | ||
assert protobuf_helpers.check_oneof(foo=None, baz='bacon') is None | ||
assert (protobuf_helpers.check_oneof(foo='bar', spam=None, eggs=None) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There's an unrelated lint error blocking this, I sent #4250 to fix. Can you verify that |
That command ran successfully. |
No description provided.