From bcc9ed03d6e9e495d34359a381c4b612beae18da Mon Sep 17 00:00:00 2001 From: Tim Pillinger Date: Fri, 10 Jan 2025 15:55:10 +0000 Subject: [PATCH] demonstrate the any old pbs -l wallclock value will be picked up --- cylc/flow/scripts/lint.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cylc/flow/scripts/lint.py b/cylc/flow/scripts/lint.py index aaa33921ca..0832d8d273 100755 --- a/cylc/flow/scripts/lint.py +++ b/cylc/flow/scripts/lint.py @@ -194,7 +194,7 @@ def get_wallclock_directives(): # avoid matching PBS directive -W: directives[module.name] = re.compile(r'^-W\s+(\d+:)?\d+$') elif directive: - directives[module.name] = re.compile(rf'^{directive}') + directives[module.name] = re.compile(rf'^{directive}.*') return directives @@ -221,6 +221,8 @@ def check_wallclock_directives(line: str) -> Union[Dict[str, str], bool]: False >>> this(' -W foo="Hello World"') # Legit PBS use case. False + >>> this(' -l walltime whatever') + {'directive': '-l walltime whatever'} """ for directive in set(WALLCLOCK_DIRECTIVES.values()): if directive.findall(line.strip()):