Skip to content

Commit c3d0d37

Browse files
committed
fix: linting with comments after the input directive
Fixes: 3457
1 parent 22eb20c commit c3d0d37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nf_core/components/nfcore_component.py

+1
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def get_inputs_from_main_nf(self) -> None:
206206
input_data = data.split("input:")[1].split("output:")[0]
207207
for line in input_data.split("\n"):
208208
channel_elements: Any = []
209+
line = line.split("//")[0] # remove any trailing comments
209210
regex = r"(val|path)\s*(\(([^)]+)\)|\s*([^)\s,]+))"
210211
matches = re.finditer(regex, line)
211212
for _, match in enumerate(matches, start=1):

0 commit comments

Comments
 (0)