Skip to content

Commit 52e8d4b

Browse files
committed
[automated] Fix code linting
1 parent 1283406 commit 52e8d4b

File tree

15 files changed

+32
-32
lines changed

15 files changed

+32
-32
lines changed

nf_core/components/components_differ.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,7 @@ def print_diff(
271271
console = Console(force_terminal=nf_core.utils.rich_force_colors())
272272
if current_version is not None and new_version is not None:
273273
log.info(
274-
f"Changes in component '{Path(repo_path, component)}' between"
275-
f" ({current_version}) and"
276-
f" ({new_version})"
274+
f"Changes in component '{Path(repo_path, component)}' between ({current_version}) and ({new_version})"
277275
)
278276
else:
279277
log.info(f"Changes in component '{Path(repo_path, component)}'")

nf_core/components/info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ def generate_component_info_help(self):
265265
intro_text.append(
266266
Text.from_markup(
267267
":globe_with_meridians: Repository: "
268-
f"{ '[link={self.remote_location}]' if self.remote_location.startswith('http') else ''}"
268+
f"{'[link={self.remote_location}]' if self.remote_location.startswith('http') else ''}"
269269
f"{self.remote_location}"
270-
f"{'[/link]' if self.remote_location.startswith('http') else '' }"
270+
f"{'[/link]' if self.remote_location.startswith('http') else ''}"
271271
"\n"
272272
)
273273
)

nf_core/components/lint/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(
102102
continue
103103
if isinstance(components, str):
104104
raise LookupError(
105-
f"Error parsing modules.json: {components}. " f"Please check the file for errors or try again."
105+
f"Error parsing modules.json: {components}. Please check the file for errors or try again."
106106
)
107107
for org, comp in components:
108108
self.all_remote_components.append(

nf_core/components/remove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,6 @@ def remove(self, component, removed_by=None, removed_components=None, force=Fals
176176
f"Did not remove '{component}', because it was also manually installed. Only updated 'installed_by' entry in modules.json."
177177
)
178178
log.info(
179-
f"""Did not remove {self.component_type[:-1]} '{component}', because it was also installed by {', '.join(f"'{d}'" for d in installed_by)}. Only updated the 'installed_by' entry in modules.json."""
179+
f"""Did not remove {self.component_type[:-1]} '{component}', because it was also installed by {", ".join(f"'{d}'" for d in installed_by)}. Only updated the 'installed_by' entry in modules.json."""
180180
)
181181
return removed

nf_core/modules/lint/meta_yml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def meta_yml(module_lint_object: ComponentLint, module: NFCoreComponent) -> None
7878
if len(e.path) > 0:
7979
hint = f"\nCheck the entry for `{e.path[0]}`."
8080
if e.message.startswith("None is not of type 'object'") and len(e.path) > 2:
81-
hint = f"\nCheck that the child entries of {str(e.path[0])+'.'+str(e.path[2])} are indented correctly."
81+
hint = f"\nCheck that the child entries of {str(e.path[0]) + '.' + str(e.path[2])} are indented correctly."
8282
if e.schema and isinstance(e.schema, dict) and "message" in e.schema:
8383
e.message = e.schema["message"]
8484
incorrect_value = meta_yaml

nf_core/pipelines/download.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def download_workflow(self):
202202
raise DownloadError(e) from e
203203

204204
summary_log = [
205-
f"Pipeline revision: '{', '.join(self.revision) if len(self.revision) < 5 else self.revision[0]+',['+str(len(self.revision)-2)+' more revisions],'+self.revision[-1]}'",
205+
f"Pipeline revision: '{', '.join(self.revision) if len(self.revision) < 5 else self.revision[0] + ',[' + str(len(self.revision) - 2) + ' more revisions],' + self.revision[-1]}'",
206206
f"Use containers: '{self.container_system}'",
207207
]
208208
if self.container_system:
@@ -1908,8 +1908,8 @@ def __init__(
19081908

19091909
log.error(self.error_type.message)
19101910
log.info(self.error_type.helpmessage)
1911-
log.debug(f'Failed command:\n{" ".join(singularity_command)}')
1912-
log.debug(f'Singularity error messages:\n{"".join(error_msg)}')
1911+
log.debug(f"Failed command:\n{' '.join(singularity_command)}")
1912+
log.debug(f"Singularity error messages:\n{''.join(error_msg)}")
19131913

19141914
raise self.error_type
19151915

nf_core/pipelines/lint/multiqc_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def multiqc_config(self) -> Dict[str, List[str]]:
122122
f"The expected comment is: \n"
123123
f"```{hint}``` \n"
124124
f"The current comment is: \n"
125-
f"```{ mqc_yml['report_comment'].strip()}```"
125+
f"```{mqc_yml['report_comment'].strip()}```"
126126
)
127127
else:
128128
passed.append("`assets/multiqc_config.yml` contains a matching 'report_comment'.")

nf_core/pipelines/lint/version_consistency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def version_consistency(self):
5353
# Check if they are consistent
5454
if len(set(versions.values())) != 1:
5555
failed.append(
56-
"The versioning is not consistent between container, release tag " "and config. Found {}".format(
56+
"The versioning is not consistent between container, release tag and config. Found {}".format(
5757
", ".join([f"{k} = {v}" for k, v in versions.items()])
5858
)
5959
)

nf_core/pipelines/params_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"of nextflow run with the {pipeline_name} pipeline."
2020
)
2121

22-
USAGE = "Uncomment lines with a single '#' if you want to pass the parameter " "to the pipeline."
22+
USAGE = "Uncomment lines with a single '#' if you want to pass the parameter to the pipeline."
2323

2424
H1_SEPERATOR = "## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
2525
H2_SEPERATOR = "## ----------------------------------------------------------------------------"
@@ -107,7 +107,7 @@ def get_pipeline(self) -> Optional[bool]:
107107
# Prompt for pipeline if not supplied
108108
if self.pipeline is None:
109109
launch_type = questionary.select(
110-
"Generate parameter file for local pipeline " "or remote GitHub pipeline?",
110+
"Generate parameter file for local pipeline or remote GitHub pipeline?",
111111
choices=["Remote pipeline", "Local path"],
112112
style=nf_core.utils.nfcore_question_style,
113113
).unsafe_ask()

nf_core/pipelines/rocrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def set_main_entity(self, main_entity_filename: str):
212212
else:
213213
url = self.version
214214
self.crate.mainEntity.append_to(
215-
"url", f"https://nf-co.re/{self.crate.name.replace('nf-core/','')}/{url}/", compact=True
215+
"url", f"https://nf-co.re/{self.crate.name.replace('nf-core/', '')}/{url}/", compact=True
216216
)
217217
self.crate.mainEntity.append_to("version", self.version, compact=True)
218218

0 commit comments

Comments
 (0)