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

Description argument not documented #471

Closed steverep closed 9 months ago

steverep commented 2 years ago

The description argument for the Marker class (or any subclass) is not documented anywhere, so it's unclear what's allowed and how it affects the schema.

spacegaier commented 2 years ago

You can see in the PR that added that option (https://github.com/alecthomas/voluptuous/pull/307) it is not really used inside the library itself, but allows having a description that can then be used by the schema creator if required, e.g. for some introspection, see this issue with the reasoning behind that feature: https://github.com/alecthomas/voluptuous/issues/305

There is nothing specifically allowed for description. You can pass anything in.

steverep commented 2 years ago

Thanks for the explanation. Pasting something similar into the doc string would have saved me some confusion.