Skip to content

Conversation

@landrito
Copy link
Contributor

No description provided.

@landrito landrito requested a review from theacodes October 24, 2017 22:22
@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
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants