Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions voluptuous/schema_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,12 @@ def _compile_mapping(self, schema, invalid_msg=None):
)

# Keys that may have defaults
all_default_keys = set(
key
for key in schema
if isinstance(key, Required) or isinstance(key, Optional)
all_default_keys = tuple(
{
key: None
for key in schema
if isinstance(key, Required) or isinstance(key, Optional)
}.keys()
)

_compiled_schema = {}
Expand Down