Skip to content

Commit 6615403

Browse files
committed
Add the checkers for 3 and 4 too.
1 parent 46941e3 commit 6615403

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

jsonschema/validators.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from six import add_metaclass
99

1010
from jsonschema import (
11+
_format,
1112
_legacy_validators,
1213
_types,
1314
_utils,
@@ -27,11 +28,6 @@
2728
urlsplit,
2829
)
2930

30-
from jsonschema._format import (
31-
draft6_format_checker,
32-
draft7_format_checker,
33-
)
34-
3531
# Sigh. https://gitlab.com/pycqa/flake8/issues/280
3632
# https://github.com/pyga/ebb-lint/issues/7
3733
# Imported for backwards compatibility.
@@ -479,7 +475,7 @@ def extend(validator, validators=(), version=None, type_checker=None):
479475
type_checker=_types.draft3_type_checker,
480476
version="draft3",
481477
id_of=lambda schema: schema.get(u"id", ""),
482-
format_checker=None,
478+
format_checker=_format.draft3_format_checker,
483479
)
484480

485481
Draft4Validator = create(
@@ -515,7 +511,7 @@ def extend(validator, validators=(), version=None, type_checker=None):
515511
type_checker=_types.draft4_type_checker,
516512
version="draft4",
517513
id_of=lambda schema: schema.get(u"id", ""),
518-
format_checker=None,
514+
format_checker=_format.draft4_format_checker,
519515
)
520516

521517
Draft6Validator = create(
@@ -555,7 +551,7 @@ def extend(validator, validators=(), version=None, type_checker=None):
555551
},
556552
type_checker=_types.draft6_type_checker,
557553
version="draft6",
558-
format_checker=draft6_format_checker,
554+
format_checker=_format.draft6_format_checker,
559555
)
560556

561557
Draft7Validator = create(
@@ -596,7 +592,7 @@ def extend(validator, validators=(), version=None, type_checker=None):
596592
},
597593
type_checker=_types.draft7_type_checker,
598594
version="draft7",
599-
format_checker=draft7_format_checker,
595+
format_checker=_format.draft7_format_checker,
600596
)
601597

602598
_LATEST_VERSION = Draft7Validator

0 commit comments

Comments
 (0)