We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e6859d commit f27e2c8Copy full SHA for f27e2c8
1 file changed
nf_core/utils.py
@@ -412,7 +412,12 @@ def read_module_name(main_nf: Path) -> str | None:
412
"""Return the process name declared in a Nextflow ``main.nf`` file, or ``None``."""
413
414
_NF_PROCESS_NAME_RE = re.compile(r"^\s*process\s+(\w+)\s*\{", re.MULTILINE)
415
- try:
+
416
417
+_NF_PROCESS_NAME_RE = re.compile(r"^\s*process\s+(\w+)\s*\{", re.MULTILINE)
418
419
+def read_module_name(main_nf: Path) -> str | None:
420
+"""Return the process name declared in a Nextflow ``main.nf`` file, or ``None``."""
421
match = _NF_PROCESS_NAME_RE.search(main_nf.read_text())
422
return match.group(1) if match else None
423
except OSError:
0 commit comments