Skip to content

Commit

Permalink
fixes for linting modules without an input
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Sep 18, 2024
1 parent 809074b commit 53448ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions nf_core/components/nfcore_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def get_inputs_from_main_nf(self) -> None:
# don't match anything inside comments or after "output:"
if "input:" not in data:
log.debug(f"Could not find any inputs in {self.main_nf}")
return
input_data = data.split("input:")[1].split("output:")[0]
for line in input_data.split("\n"):
channel_elements: list[dict[str, dict[str, str]]] = []
Expand Down
4 changes: 2 additions & 2 deletions nf_core/modules/lint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def update_meta_yml_file(self, mod):
if "output" in meta_yml:
correct_outputs, meta_outputs = self.obtain_correct_and_specified_outputs(mod, meta_yml)

if correct_inputs != meta_inputs:
if "input" in meta_yml and correct_inputs != meta_inputs:
log.debug(
f"Correct inputs: '{correct_inputs}' differ from current inputs: '{meta_inputs}' in '{mod.meta_yml}'"
)
Expand Down Expand Up @@ -319,7 +319,7 @@ def update_meta_yml_file(self, mod):
][feature]
break

if correct_outputs != meta_outputs:
if "output" in meta_yml and correct_outputs != meta_outputs:
log.debug(
f"Correct outputs: '{correct_outputs}' differ from current outputs: '{meta_outputs}' in '{mod.meta_yml}'"
)
Expand Down

0 comments on commit 53448ce

Please sign in to comment.