Skip to content

Fix narrowing related code for types with overloaded __new__ - #20676

Merged
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:narrow61
Jan 29, 2026
Merged

Fix narrowing related code for types with overloaded __new__#20676
hauntsaninja merged 1 commit into
python:masterfrom
hauntsaninja:narrow61

Conversation

@hauntsaninja

Copy link
Copy Markdown
Collaborator

I introduced some more instances of #12320

Noticed while analysing #20674

I introduced some more instances of python#12320
Noticed while analysing python#20674
@hauntsaninjahauntsaninja mentioned this pull request Jan 29, 2026
@hauntsaninjahauntsaninja changed the title Fix some narrowing related object for types with overloaded __new__Fix narrowing related code for types with overloaded __new__Jan 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pydantic (https://github.com/pydantic/pydantic)
+ pydantic/_internal/_generate_schema.py:525: error: Unused "type: ignore" comment [unused-ignore]

@hauntsaninja
hauntsaninja merged commit 956e3ab into python:masterJan 29, 2026
23 checks passed
@hauntsaninja
hauntsaninja deleted the narrow61 branch January 29, 2026 18:52
Sign up for freeto 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.

2 participants

@hauntsaninja@JukkaL