Skip to content

Commit 953055d

Browse files
committed
fix type error
1 parent 8a78d4b commit 953055d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

nf_core/pipelines/rocrate.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)