Skip to content

[re] Add union fallback overload for escape - #16745

Open
bschnurr wants to merge 1 commit into
python:mainfrom
bschnurr:fix/pyright-pr11970-feedback
Open

bschnurr wants to merge 1 commit into
python:mainfrom
bschnurr:fix/pyright-pr11970-feedback

Conversation

@bschnurr

@bschnurr bschnurr commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Add a final str | ReadableBuffer overload for re.escape so nullable-input diagnostics identify the unsupported None member rather than blaming a supported str value, while preserving existing string, buffer, AnyStr, and Any inference.

CPython implementation.

Prepared with GitHub Copilot (GPT-6.1 Sol).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

No deployments
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.

1 participant