Skip to content

Subst cleanups#4874

Merged
bdbaddog merged 1 commit into
SCons:masterfrom
mwichmann:maint/more-subst-2
Jul 17, 2026
Merged

Subst cleanups#4874
bdbaddog merged 1 commit into
SCons:masterfrom
mwichmann:maint/more-subst-2

Conversation

@mwichmann

@mwichmann mwichmann commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Changes to doctrings and typing in function signatures. scons_subst and scons_subst_list now check if the overrides arg is None.

Small tweak to ActionTests is to make sure it actually calls scons_subst and scons_subst_list with overrides as a dict (previously it defaulted to a bool).

No functionality changes. This the the rest of the work split out from PR #4869.

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 RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

Changes to doctrings and typing in function signatures.
scons_subst and scons_subst_list now check if the ovverides arg is None.

Small tweak to ActionTests is to make sure it actually calls scons_subst
and scons_subst_list with overrides as a dict (previously it defaulted
to a bool).

Signed-off-by: Mats Wichmann <mats@linux.com>
@mwichmann mwichmann added documentation subst Problems with quoting, substitution labels Jul 6, 2026
@bdbaddog

Copy link
Copy Markdown
Contributor

Hmm copilot says

The PR uses PEP 604 union types (e.g., dict | None, str | None). That requires Python 3.10+. Confirm the repository’s minimum supported Python version. If the project must still support Python 3.8/3.9, switch to typing.Optional / typing.Union (e.g., Optional[dict]) or use from future import annotations plus string-annotated types where appropriate—note that future import does not allow PEP 604 syntax on older interpreters (the literal | union is syntax-level).
Action: confirm minimum supported Python and either accept the bump to 3.10+ or convert these annotations to typing.Optional[...] for compatibility.```

Is that correct?

@bdbaddog

Copy link
Copy Markdown
Contributor

Hmm copilot says

The PR uses PEP 604 union types (e.g., dict | None, str | None). That requires Python 3.10+. Confirm the repository’s minimum supported Python version. If the project must still support Python 3.8/3.9, switch to typing.Optional / typing.Union (e.g., Optional[dict]) or use from future import annotations plus string-annotated types where appropriate—note that future import does not allow PEP 604 syntax on older interpreters (the literal | union is syntax-level).
Action: confirm minimum supported Python and either accept the bump to 3.10+ or convert these annotations to typing.Optional[...] for compatibility.```

Is that correct?

Meh.. show's how smart copilot is..

@bdbaddog
bdbaddog merged commit 36e09bd into SCons:master Jul 17, 2026
8 of 12 checks passed
@mwichmann

Copy link
Copy Markdown
Collaborator Author

Meh.. show's how smart copilot is..

Yeah, right about the concern, but not the right version range.

@mwichmann mwichmann added this to 4.11 Jul 17, 2026
@github-project-automation github-project-automation Bot moved this to Done in 4.11 Jul 17, 2026
@mwichmann mwichmann added this to the 4.11.0 milestone Jul 17, 2026
@mwichmann
mwichmann deleted the maint/more-subst-2 branch July 17, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation subst Problems with quoting, substitution

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants