Skip to content

Commit

Permalink
demonstrate the any old pbs -l wallclock value will be picked up
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Jan 10, 2025
1 parent fef13fb commit bcc9ed0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cylc/flow/scripts/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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()):
Expand Down

0 comments on commit bcc9ed0

Please sign in to comment.