Skip to content

Commit

Permalink
use format instead of f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Aug 27, 2024
1 parent 19ec188 commit fa2750a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nf_core/pipelines/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,9 @@ def validate_schema_title_description(self, schema=None):
if "title" not in self.schema:
raise AssertionError("Schema missing top-level `title` attribute")
# Validate that id, title and description match the pipeline manifest
pipeline_name = self.pipeline_manifest["name"].strip("\"'")
id_attr = f"https://raw.githubusercontent.com/{pipeline_name}/main/nextflow_schema.json"
id_attr = "https://raw.githubusercontent.com/{}/main/nextflow_schema.json".format(
self.pipeline_manifest["name"].strip("\"'")
)
if self.schema["$id"] not in [id_attr, id_attr.replace("/main/", "/master/")]:
raise AssertionError(
f"Schema `$id` should be `{id_attr}` or {id_attr.replace("/main/", "/master/")}. \n Found `{self.schema['$id']}`"
Expand Down

0 comments on commit fa2750a

Please sign in to comment.