File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 42
42
RELEASE_API_PATTERN = "https://api.github.com/repos/(?P<owner>[^/]+)/(?P<repo>[^/]+)/releases/tags/(?P<tag>.*)"
43
43
44
44
45
+ SCHEMA = files ("jupyter_releaser" ).joinpath ("schema.json" ).read_text ()
46
+ SCHEMA = json .loads (SCHEMA )
47
+
48
+
45
49
def run (cmd , ** kwargs ):
46
50
"""Run a command as a subprocess and get the output as a string"""
47
51
quiet_error = kwargs .pop ("quiet_error" , False )
@@ -287,10 +291,7 @@ def read_config():
287
291
if "jupyter-releaser" in data :
288
292
config = data ["jupyter-releaser" ]
289
293
290
- schema = files ("jupyter_releaser" ).joinpath ("schema.json" ).read_text ()
291
- schema = json .loads (schema )
292
-
293
294
config = config or {}
294
- validator = Validator (schema )
295
+ validator = Validator (SCHEMA )
295
296
validator .validate (config )
296
297
return config
You can’t perform that action at this time.
0 commit comments