File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 4
4
import collections
5
5
import ipywidgets
6
6
import jsonschema
7
+ from jsonschema .validators import Draft7Validator
7
8
import json
8
9
import os
9
10
import re
@@ -99,13 +100,7 @@ def __init__(
99
100
the built-in sorted, but is no-op if sorted raises a TypeError.
100
101
"""
101
102
# Make sure that the given schema is valid
102
- filename = os .path .join (
103
- os .path .split (jsonschema .__file__ )[0 ], "schemas" , "draft7.json"
104
- )
105
- with open (filename , "r" ) as f :
106
- meta_schema = json .load (f )
107
- meta_schema ["additionalProperties" ] = False
108
- jsonschema .validate (instance = schema , schema = meta_schema )
103
+ Draft7Validator .check_schema (schema )
109
104
110
105
# Store the given data members
111
106
self .schema = schema
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ classifiers = [
23
23
dependencies = [
24
24
" IPython" ,
25
25
" ipywidgets" ,
26
- " jsonschema<4 " ,
26
+ " jsonschema<5 " ,
27
27
" packaging" ,
28
28
" traitlets" ,
29
29
]
You can’t perform that action at this time.
0 commit comments