Skip to content

Fix narrowing for AbstractSet and Mapping#21352

Merged
JukkaL merged 5 commits intopython:masterfrom
hauntsaninja:mypynarrow
Apr 28, 2026
Merged

Fix narrowing for AbstractSet and Mapping#21352
JukkaL merged 5 commits intopython:masterfrom
hauntsaninja:mypynarrow

Conversation

@hauntsaninja
Copy link
Copy Markdown
Collaborator

@hauntsaninja hauntsaninja commented Apr 28, 2026

This builds on the tech I added a few days ago in #21281. So we can also get rid of frozenset special case from #21151. I believe we account for all the dangerous_comparison logic now

@github-actions
Copy link
Copy Markdown
Contributor

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

xarray (https://github.com/pydata/xarray)
- xarray/tests/test_dataarray.py:291: error: Unused "type: ignore" comment  [unused-ignore]

Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, looks cleaner now!

@JukkaL JukkaL merged commit c4b9a29 into python:master Apr 28, 2026
39 of 40 checks passed
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.

3 participants