Skip to content

Commit

Permalink
Drop duplicated type checks in Schema._compile (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored Dec 1, 2023
1 parent 5160e05 commit 891b2ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion voluptuous/schema_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def _compile(self, schema):
type_ = type(schema)
if inspect.isclass(schema):
type_ = schema
if type_ in (*primitive_types, object, list, dict, type(None)) or callable(schema):
if type_ in (*primitive_types, object, type(None)) or callable(schema):
return _compile_scalar(schema)
raise er.SchemaError('unsupported schema data type %r' %
type(schema).__name__)
Expand Down

0 comments on commit 891b2ea

Please sign in to comment.