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 some AddOption issues #4596

Merged
merged 2 commits into from
Sep 16, 2024
Merged

Conversation

mwichmann
Copy link
Collaborator

The optparse.add_option method supports an additional calling style that is not directly described in SCons docs, but is included by reference ("see the optparse documentation for details"): it takes a single argument consisting of a premade option object. Because the optparse code detects that case based on seeing zero kwargs, and we always add at least one (default=) that would fail for AddOption. Fix for consistency, but don't advertise it further: not added to manpage synoposis/description.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt (and read the README.rst)
  • I have updated the appropriate documentation

The optparse add_option method supports an additional calling style
that is not directly described in SCons docs, but is included
by reference ("see the optparse documentation for details"):
it takes a single arg consisting of a premade option object.
Because the optparse code detects that case based on seeing zero
kwargs, and we always add at least one (default=) that would fail
for AddOption. Fix for consistency, but don't advertise it further:
not addewd to manpage synoposis/description.

Signed-off-by: Mats Wichmann <[email protected]>
@mwichmann mwichmann added the args_and_options options processing, arguments, get/setoption and their relationshiop label Sep 11, 2024
@bdbaddog bdbaddog merged commit 5d453c2 into SCons:master Sep 16, 2024
6 of 8 checks passed
@mwichmann mwichmann added this to the NextRelease milestone Sep 16, 2024
@mwichmann mwichmann deleted the AddOption-option-obj branch September 16, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
args_and_options options processing, arguments, get/setoption and their relationshiop
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

2 participants