Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use typing.Container for In validator #518

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Jun 25, 2024

... in ... only requires __contains__. The In validator should therefore use Container instead of Iterable.

Refs home-assistant/core#120268
/CC @bdraco

https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes

@alecthomas alecthomas merged commit 4a610d3 into alecthomas:master Jun 25, 2024
8 checks passed
@cdce8p cdce8p deleted the in-container branch June 25, 2024 22:15
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