Skip to content

Commit

Permalink
W503 resolution made clear
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmakkar08 committed Apr 24, 2016
1 parent fdbf8ce commit 90942ad
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions voluptuous/schema_builder.py
Expand Up @@ -221,11 +221,15 @@ def _compile_mapping(self, schema, invalid_msg=None):
invalid_msg = invalid_msg or 'mapping value'

# Keys that may be required
all_required_keys = set(key for key in schema if key is not Extra and (
(self.required and not isinstance(key, (Optional, Remove))) or isinstance(key, Required)))
all_required_keys = set(key for key in schema
if key is not Extra and
((self.required and not isinstance(key, (Optional, Remove))) or
isinstance(key, Required)))

# 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 = set(key for key in schema
if isinstance(key, Required) or
isinstance(key, Optional))

_compiled_schema = {}
for skey, svalue in iteritems(schema):
Expand Down

0 comments on commit 90942ad

Please sign in to comment.