Skip to content

Return True if Validator.check_schema does not raise exception. #606

@ghost

Description

Hi.

Currently, Validator.check_schema doesn't explicitly return True.
It would be easy to test the schema if returns True.

before

@classmethod
def check_schema(cls, schema):
    for error in cls(cls.META_SCHEMA).iter_errors(schema):
        raise exceptions.SchemaError.create_from(error)

after

@classmethod
def check_schema(cls, schema):
    for error in cls(cls.META_SCHEMA).iter_errors(schema):
        raise exceptions.SchemaError.create_from(error)
    return True

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions