Skip to content

gh-159338: Default the warning checker's optional path prefix to an empty string - #159339

Closed
esadomer wants to merge 2 commits into
python:mainfrom
esadomer:fix-20261013-08-warnings-default-path-prefix
Closed

esadomer wants to merge 2 commits into
python:mainfrom
esadomer:fix-20261013-08-warnings-default-path-prefix

Conversation

@esadomer

@esadomer esadomer commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Running check_warnings.py without --path-prefix passes None to str.removeprefix() and raises TypeError. Default the optional argument to an empty string so an omitted prefix leaves warning paths unchanged.

Fixes #159338.

Validation (Windows debug build): the isolated CLI regression passed (1 test); it raised TypeError before the fix. The isolated patch applies cleanly to the base revision.

Merge coordination: #159337 and #159341 add different regression tests to the same new test_check_warnings.py module. After the first PR merges, the remaining branches need to incorporate the landed tests before merging.

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.

Default the warning checker's optional path prefix to an empty string

2 participants