File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -275,17 +275,20 @@ def read_config():
275
275
if JUPYTER_RELEASER_CONFIG .exists ():
276
276
config = toml .loads (JUPYTER_RELEASER_CONFIG .read_text (encoding = "utf-8" ))
277
277
278
- elif PYPROJECT .exists ():
278
+ if not config and PYPROJECT .exists ():
279
279
data = toml .loads (PYPROJECT .read_text (encoding = "utf-8" ))
280
- config = data .get ("tool" , {}).get ("jupyter-releaser" ) or {}
280
+ pyproject_config = data .get ("tool" , {}).get ("jupyter-releaser" )
281
+ if pyproject_config :
282
+ config = pyproject_config
281
283
282
- elif PACKAGE_JSON .exists ():
284
+ if not config and PACKAGE_JSON .exists ():
283
285
data = json .loads (PACKAGE_JSON .read_text (encoding = "utf-8" ))
284
286
if "jupyter-releaser" in data :
285
287
config = data ["jupyter-releaser" ]
286
288
287
289
with open (osp .join (HERE , "schema.json" )) as fid :
288
290
schema = json .load (fid )
291
+
289
292
validator = Validator (schema )
290
293
validator .validate (config )
291
294
return config
You can’t perform that action at this time.
0 commit comments