From b96a4d0143c3a569f0a22b219edb64be2cd90d1f Mon Sep 17 00:00:00 2001 From: ColemanTom <15375218+ColemanTom@users.noreply.github.com> Date: Fri, 24 Nov 2023 03:23:18 +1100 Subject: [PATCH] lint - S011 no longer warns against 0{{a}} (#5841) lint - S011 no longer warns against 0{{a}} --- changes.d/5841.fix.md | 1 + cylc/flow/scripts/lint.py | 2 +- tests/unit/scripts/test_lint.py | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changes.d/5841.fix.md diff --git a/changes.d/5841.fix.md b/changes.d/5841.fix.md new file mode 100644 index 00000000000..9e11386b8d0 --- /dev/null +++ b/changes.d/5841.fix.md @@ -0,0 +1 @@ +Improve handling of S011 to not warn if the # is '#$' (e.g. shell base arithmetic) \ No newline at end of file diff --git a/cylc/flow/scripts/lint.py b/cylc/flow/scripts/lint.py index e3a08493a57..1246cb08688 100755 --- a/cylc/flow/scripts/lint.py +++ b/cylc/flow/scripts/lint.py @@ -437,7 +437,7 @@ def check_indentation(line: str) -> bool: 'evaluate commented lines': True, FUNCTION: functools.partial( check_if_jinja2, - function=re.compile(r'(?