Skip to content

allow arbitrary types in set.discard#15295

Closed
randolf-scholz wants to merge 2 commits intopython:mainfrom
randolf-scholz:set_disjoint_types
Closed

allow arbitrary types in set.discard#15295
randolf-scholz wants to merge 2 commits intopython:mainfrom
randolf-scholz:set_disjoint_types

Conversation

@randolf-scholz
Copy link
Contributor

Fixes #15271

@github-actions

This comment has been minimized.

@randolf-scholz
Copy link
Contributor Author

Homeassistent error is harmless:

class _ComponentSet(set[str]):
    def discard(self, value: str) -> None:
        """Remove a component from the store."""
        raise NotImplementedError("_ComponentSet does not support discard, use remove")

they just need to update to object.

@randolf-scholz randolf-scholz changed the title allow arbirary types in set.discard allow arbitrary types in set.discard Feb 28, 2026
@github-actions
Copy link
Contributor

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

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.

Several methods on built-in types are too strict.

1 participant