Skip to content

Commit

Permalink
fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Dec 10, 2024
1 parent 8a78d4b commit 953055d
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions nf_core/pipelines/rocrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,18 +354,17 @@ def update_rocrate(self) -> bool:
"""
# check if we need to output a json file and/or a zip file based on the file extensions
# try to find a json file
json_path = Path(self.pipeline_dir, "ro-crate-metadata.json")
if json_path.exists():
json_path = json_path
else:
json_path = None
json_path: Optional[Path] = None
potential_json_path = Path(self.pipeline_dir, "ro-crate-metadata.json")
if potential_json_path.exists():
json_path = potential_json_path

# try to find a zip file
zip_path = Path(self.pipeline_dir, "ro-crate.crate.zip")
if zip_path.exists():
zip_path = zip_path
else:
zip_path = None
zip_path: Optional[Path] = None
potential_zip_path = Path(self.pipeline_dir, "ro-crate.crate.zip")
if potential_zip_path.exists():
zip_path = potential_zip_path

return self.create_rocrate(json_path=json_path, zip_path=zip_path)


Expand Down

0 comments on commit 953055d

Please sign in to comment.