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

Further explain kwargs for Python stack funcs #9794

Merged
merged 3 commits into from Jun 9, 2022
Merged

Conversation

squaremo
Copy link
Contributor

@squaremo squaremo commented Jun 7, 2022

The *_stack functions in the pulumi.automation package take keyword arguments that control where the program used in the stack comes from. In particular, the keyword argument work_dir (and absence of program and project_name) indicates that the program should be constructed using the given directory. There's also a field with the same name accepted in the opts argument, leading to confusion in at least one case (see #8436).

This commit tries to mitigate the confusion by making the docstrings for those functions more explicit about which arguments are required and ignored in each case.

Addresses #8436.

Checklist

  • I have added tests that prove my fix is effective or that my feature works

No additional or adapted tests -- Python docstring changes only.

  • I have updated the CHANGELOG-PENDING file with my change

  • Yes, there are changes in this PR that warrants bumping the Pulumi Service API version

Copy link
Member

@Frassle Frassle left a comment

Choose a reason for hiding this comment

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

LGTM

The *_stack functions in the pulumi.automation package take keyword
arguments that control where the program used in the stack comes
from. In particular, the keyword argument work_dir (and absence of
program and project_name) indicates that the program should be
constructed using the given directory. There's _also_ a field with the
same name accepted in the opts argument, leading to confusion in at
least one case (see #8436).

This commit tries to mitigate the confusion by making the docstrings for
those functions more explicit about which arguments are required and
ignored in each case.

Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
Signed-off-by: Michael Bridgen <mbridgen@pulumi.com>
@Frassle Frassle merged commit e32aa26 into master Jun 9, 2022
@pulumi-bot pulumi-bot deleted the work_dir_arg_issue8436 branch June 9, 2022 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants