Skip to content
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

Merged
merged 4 commits into from
Oct 25, 2017
Merged

Port gax helper methods #4249

merged 4 commits into from
Oct 25, 2017

Conversation

landrito
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 24, 2017
Copy link
Contributor

@theacodes theacodes left a 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.

"""
# 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.

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.

@theacodes
Copy link
Contributor

There's an unrelated lint error blocking this, I sent #4250 to fix. Can you verify that nox -s "unit_tests(python_version='3.6')" works locally? if so, I'm happy to merge this as-is without waiting to rebase.

@landrito
Copy link
Contributor Author

That command ran successfully.

@theacodes theacodes merged commit 877ef4e into googleapis:master Oct 25, 2017
@theacodes theacodes added this to Done in google.api.core Oct 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core cla: yes This human has signed the Contributor License Agreement.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants