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

fix: make args optional #521

Merged
merged 2 commits into from
May 5, 2020
Merged

fix: make args optional #521

merged 2 commits into from
May 5, 2020

Conversation

summer-ji-eng
Copy link
Contributor

multiple version needs two args: versions and defualt_version:
it should be the optional arguments, but previous code throw keyError

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 4, 2020
Copy link
Contributor

@alexander-fenster alexander-fenster left a comment

Choose a reason for hiding this comment

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

LGTM but I'd like someone with Python background to take a look (@SurferJeffAtGoogle? :) )

@@ -94,7 +94,7 @@ def node_library(self, **kwargs) -> Path:
kwargs["publish_token"] = node.get_publish_token(kwargs["metadata"]["name"])

# generate root-level `src/index.ts` to export multiple versions and its default clients
if kwargs["versions"] and kwargs["default_version"]:
if "versions" in kwargs and "default_version" in kwargs:
Copy link
Contributor

Choose a reason for hiding this comment

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

echoing @alexander-fenster's comment, I'm not the best Python developer these days. This looks good to me, but could we add a test to confirm the behavior perhaps?

Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

I understand if it's too much of a hassle to add a test to common, since we don't have a pattern for testing this yet.

I'll leave it up to you (depending on @SurferJeffAtGoogle's feedback).

@SurferJeffAtGoogle SurferJeffAtGoogle merged commit ea3ae39 into googleapis:master May 5, 2020
@summer-ji-eng summer-ji-eng deleted the fix_args_optional branch May 5, 2020 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants