Skip to content

[builtins] Relax frozenset.isdisjoint method to accept Iterable[object]#15381

Open
Sachaa-Thanasius wants to merge 1 commit intopython:mainfrom
Sachaa-Thanasius:relax-frozenset-method-parameter-types
Open

[builtins] Relax frozenset.isdisjoint method to accept Iterable[object]#15381
Sachaa-Thanasius wants to merge 1 commit intopython:mainfrom
Sachaa-Thanasius:relax-frozenset-method-parameter-types

Conversation

@Sachaa-Thanasius
Copy link
Contributor

@Sachaa-Thanasius Sachaa-Thanasius commented Feb 6, 2026

Related to #15271.

This prevents false positives, and it is anyhow a better match for what the runtime accepts.

Additionally, set.isdisjoint is currently annotated as accepting Iterable[Any] and seems to have been that way for years. I don't think Any is better than object there or here, but I'm not certain.

@github-actions

This comment has been minimized.

Related to python#15271.

This prevents false positives, and it is anyhow a better match for what the runtime accepts.
@Sachaa-Thanasius Sachaa-Thanasius force-pushed the relax-frozenset-method-parameter-types branch from 42602df to bcf70ef Compare February 6, 2026 22:07
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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

@Sachaa-Thanasius Sachaa-Thanasius changed the title Relax isdisjoint method to accept Iterable[object] [builtins] Relax set.isdisjoint method to accept Iterable[object] Feb 13, 2026
@Sachaa-Thanasius Sachaa-Thanasius changed the title [builtins] Relax set.isdisjoint method to accept Iterable[object] [builtins] Relax frozenset.isdisjoint method to accept Iterable[object] Feb 13, 2026
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