File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -354,18 +354,17 @@ def update_rocrate(self) -> bool:
354354 """
355355 # check if we need to output a json file and/or a zip file based on the file extensions
356356 # try to find a json file
357- json_path = Path (self .pipeline_dir , "ro-crate-metadata.json" )
358- if json_path .exists ():
359- json_path = json_path
360- else :
361- json_path = None
357+ json_path : Optional [Path ] = None
358+ potential_json_path = Path (self .pipeline_dir , "ro-crate-metadata.json" )
359+ if potential_json_path .exists ():
360+ json_path = potential_json_path
362361
363362 # try to find a zip file
364- zip_path = Path ( self . pipeline_dir , "ro-crate.crate.zip" )
365- if zip_path . exists ():
366- zip_path = zip_path
367- else :
368- zip_path = None
363+ zip_path : Optional [ Path ] = None
364+ potential_zip_path = Path ( self . pipeline_dir , "ro-crate.crate.zip" )
365+ if potential_zip_path . exists ():
366+ zip_path = potential_zip_path
367+
369368 return self .create_rocrate (json_path = json_path , zip_path = zip_path )
370369
371370
You can’t perform that action at this time.
0 commit comments