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.81k stars 219 forks source link

Don't enforce type for unused description attribute #519

Closed cdce8p closed 2 months ago

cdce8p commented 2 months ago

description is an optional field, unused by Voluptuous itself, but can be introspected by any external tool, for example to generate schema documentation.

As per the docstring, the description attribute is unused by voluptuous itself but can be used by external tools. It therefore shouldn't force the type to be str | None. If the tool prefers dict, that should be valid as well.

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

cdce8p commented 2 months ago

@alecthomas If you have some time, it would be great if you could take a look at this one and #521. These two are the last remaining changes needed for Home Assistant.

After they are merged, a new release (0.15.1) would be greatly appreciated.

bdraco commented 2 months ago

Thank you !!