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
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
2 changes: 1 addition & 1 deletion synthtool/gcp/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?

node.generate_index_ts(
versions=kwargs["versions"], default_version=kwargs["default_version"]
)
Expand Down