Skip to content

Commit efd1176

Browse files
committed
fix review comments
1 parent 31ae184 commit efd1176

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

nf_core/components/nfcore_component.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,16 @@ def get_outputs_from_main_nf(self):
295295
log.debug(f"Found {len(outputs)} outputs in {self.main_nf}")
296296
self.outputs = outputs
297297

298-
def get_topics_from_main_nf(self):
298+
def get_topics_from_main_nf(self) -> None:
299299
with open(self.main_nf) as f:
300300
data = f.read()
301301
if self.component_type == "modules":
302302
topics = {}
303303
# get topic name from main.nf after "output:". the names are always after "topic:"
304304
if "output:" not in data:
305305
log.debug(f"Could not find any outputs in {self.main_nf}")
306-
return topics
306+
self.topics = topics
307+
return
307308
output_data = data.split("output:")[1].split("when:")[0]
308309
regex_topic = r"topic:\s*([^)\s,]+)"
309310
regex_elements = r"\b(val|path|env|stdout|eval)\s*(\(([^)]+)\)|\s*([^)\s,]+))"

nf_core/modules/lint/main_nf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def _parse_input(self, line_raw):
720720
return inputs
721721

722722

723-
def _parse_output_emits(self, line):
723+
def _parse_output_emits(self, line:str) -> list[str]:
724724
output = []
725725
if "meta" in line:
726726
output.append("meta")
@@ -732,7 +732,7 @@ def _parse_output_emits(self, line):
732732
return output
733733

734734

735-
def _parse_output_topics(self, line):
735+
def _parse_output_topics(self, line:str) -> list[str]:
736736
output = []
737737
if "meta" in line:
738738
output.append("meta")

0 commit comments

Comments
 (0)