Skip to content

Commit

Permalink
Removed 'removeprefix' which is Py > 3.9 only
Browse files Browse the repository at this point in the history
  • Loading branch information
adamrtalbot committed Jun 8, 2023
1 parent da476f2 commit c98848a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,12 @@ def check_process_section(self, lines, fix_version, progress_bar):
# Deprecated enable_conda
for i, l in enumerate(lines):
url = None
l = l.strip().removeprefix("container ").strip(" \n'\"")
l = l.strip(" \n'\"")

# Catch preceeding "container "
if l.startswith("container"):
l = l.replace("container", "").strip(" \n'\"")

if _container_type(l) == "conda":
bioconda_packages = [b for b in l.split() if "bioconda::" in b]
match = re.search(r"params\.enable_conda", l)
Expand Down

0 comments on commit c98848a

Please sign in to comment.