alecthomas / voluptuous

CONTRIBUTIONS ONLY: Voluptuous, despite the name, is a Python data validation library.
https://pypi.org/project/voluptuous
BSD 3-Clause "New" or "Revised" License
1.82k stars 218 forks source link

Use typing.Container for In validator #518

Closed cdce8p closed 4 months ago

cdce8p commented 4 months ago

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

Refs https://github.com/home-assistant/core/pull/120268 /CC @bdraco

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