diff --git a/CHANGES.txt b/CHANGES.txt index e9f445d93..479aad978 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -49,6 +49,8 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER cl.exe-compatible command line switches. - Some manpage cleanup for the gettext and pdf/ps builders. - Some clarifications in the User Guide "Environments" chapter. + - Fixed wrong naming in the documentation of "keep_local" parameter for + the Help() method. From Alex James: - On Darwin, PermissionErrors are now handled while trying to access diff --git a/SCons/Script/Main.py b/SCons/Script/Main.py index 04b420a3b..b903a4698 100644 --- a/SCons/Script/Main.py +++ b/SCons/Script/Main.py @@ -601,8 +601,8 @@ def ValidateOptions(throw_exception: bool = False) -> None: OptionsParser.preserve_unknown_options = False OptionsParser.parse_args(OptionsParser.largs, OptionsParser.values) -def PrintHelp(file=None, local_only: bool = False) -> None: - if local_only: +def PrintHelp(file=None, keep_local: bool = False) -> None: + if keep_local: OptionsParser.print_local_option_help(file=file) else: OptionsParser.print_help(file=file) diff --git a/SCons/Script/SConscript.xml b/SCons/Script/SConscript.xml index b64d9c306..9570d29f2 100644 --- a/SCons/Script/SConscript.xml +++ b/SCons/Script/SConscript.xml @@ -272,7 +272,7 @@ file is found. -(text, append=False, local_only=False) +(text, append=False, keep_local=False) @@ -292,7 +292,7 @@ This is the help printed if &f-Help; has never been called. If append is True, text is appended to the existing help text. -If local_only is also True +If keep_local is also True (the default is False), the project-local help from &f-AddOption; calls is preserved in the help message but the &scons; command help is not. @@ -301,11 +301,11 @@ in the help message but the &scons; command help is not. Subsequent calls to &f-Help; ignore the keyword arguments append and -local_only +keep_local and always append to the existing help text. -Changed in 4.6.0: added local_only. +Changed in 4.6.0: added keep_local. diff --git a/SCons/Script/__init__.py b/SCons/Script/__init__.py index ce0105573..6cc6427ec 100644 --- a/SCons/Script/__init__.py +++ b/SCons/Script/__init__.py @@ -263,7 +263,7 @@ def HelpFunction(text, append: bool = False, keep_local: bool = False) -> None: if help_text is None: if append: with StringIO() as s: - PrintHelp(s, local_only=keep_local) + PrintHelp(s, keep_local=keep_local) help_text = s.getvalue() else: help_text = ""