alecthomas / alecthomas/voluptuous

More specific error message for Any()

Open
#412 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
1.9k
Forks
237
PR merge metrics
No merged PRs in 30d

Description

Now it's:
```python
from voluptuous import Any, Schema

schema = Schema(Any(str, None))
schema(10)
# MultipleInvalid: not a valid value
```

I would expect something like "expected str or none". I know I can pass `msg` to `Any`, but it would be nice to have better default for such a common case.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.