From 423d4dba223cca8cee5c3218c0b0e3c629aedb8b Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Mon, 27 Jul 2026 22:02:25 +0000 Subject: [PATCH 1/4] Fix flake8 ISC004 violations. --- cylc/flow/hostuserutil.py | 6 ++++-- cylc/flow/parsec/validate.py | 39 ++++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/cylc/flow/hostuserutil.py b/cylc/flow/hostuserutil.py index 37e237f99e8..ace028b5702 100644 --- a/cylc/flow/hostuserutil.py +++ b/cylc/flow/hostuserutil.py @@ -126,8 +126,10 @@ def _get_host_info( if target is None: target = socket.getfqdn() if IS_MAC_OS and target in { - '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.' - '0.0.0.0.0.0.ip6.arpa', + ( + '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.' + '0.0.0.0.0.0.ip6.arpa' + ), '1.0.0.127.in-addr.arpa', }: # Python's socket bindings don't play nicely with mac os diff --git a/cylc/flow/parsec/validate.py b/cylc/flow/parsec/validate.py index de74c8fccce..7232a7dc302 100644 --- a/cylc/flow/parsec/validate.py +++ b/cylc/flow/parsec/validate.py @@ -140,9 +140,11 @@ class ParsecValidator: ), V_ABSOLUTE_HOST_LIST: ( 'absolute host list', - 'A comma separated list of hostnames which does not contain ' - 'any self references ' - f'(i.e. does not contain {", ".join(SELF_REFERENCE_PATTERNS)})', + ( + 'A comma separated list of hostnames which does not contain ' + 'any self references ' + f'(i.e. does not contain {", ".join(SELF_REFERENCE_PATTERNS)})' + ), ['foo', 'bar', 'baz'] ) } @@ -709,9 +711,11 @@ class CylcConfigValidator(ParsecValidator): ), V_CYCLE_POINT_FORMAT: ( 'cycle point format', - 'An time format for date-time cycle points in ``isodatetime`` ' - '"print" or "parse" format. ' - 'See ``isodatetime --help`` for more information.', + ( + 'A time format for date-time cycle points in ``isodatetime`` ' + '"print" or "parse" format. ' + 'See ``isodatetime --help`` for more information.' + ), { 'CCYYMM': '``isodatetime`` print format.', '%Y%m': '``isodatetime`` parse format.' @@ -757,19 +761,22 @@ class CylcConfigValidator(ParsecValidator): ), V_INTERVAL_LIST: ( 'time interval list', - 'A comma separated list of time intervals. ' - 'These can include multipliers.', + ( + 'A comma separated list of time intervals. ' + 'These can include multipliers.' + ), { 'P1Y, P2Y, P3Y': 'After 1, 2 and 3 years.', - 'PT1M, 2*PT1H, P1D': 'After 1 minute, 1 hour, 1 hour and 1 ' - 'day' + 'PT1M, 2*PT1H, P1D': 'After 1 minute, 1 hour, 1 hour and 1 day' }, [('std:term', 'ISO8601 duration')] ), V_PARAMETER_LIST: ( 'parameter list', - 'A comma separated list of Cylc parameter values. ' - 'This can include strings, integers and integer ranges.', + ( + 'A comma separated list of Cylc parameter values. ' + 'This can include strings, integers and integer ranges.' + ), { 'foo, bar, baz': 'List of string parameters.', '1, 2, 3': 'List of integer parameters.', @@ -781,9 +788,11 @@ class CylcConfigValidator(ParsecValidator): ), V_XTRIGGER: ( 'xtrigger function signature', - 'A function signature similar to how it would be written in ' - 'Python.\n' - '``(, =):``', + ( + 'A function signature similar to how it would be written in ' + 'Python.\n' + '``(, =):``' + ), { 'mytrigger(42, cycle_point=%(point)):PT10S': 'Run function ``mytrigger`` every 10 seconds.' From 66645079d0547cdf4f084ee8adda7dd996b3f5dd Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Mon, 27 Jul 2026 23:57:17 +0000 Subject: [PATCH 2/4] Tweak a string concatenation. --- cylc/flow/parsec/validate.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cylc/flow/parsec/validate.py b/cylc/flow/parsec/validate.py index 7232a7dc302..77eb7bac1db 100644 --- a/cylc/flow/parsec/validate.py +++ b/cylc/flow/parsec/validate.py @@ -790,8 +790,7 @@ class CylcConfigValidator(ParsecValidator): 'xtrigger function signature', ( 'A function signature similar to how it would be written in ' - 'Python.\n' - '``(, =):``' + 'Python.\n``(, =):``' ), { 'mytrigger(42, cycle_point=%(point)):PT10S': From ca5adac199635cc9603569703eda8fcde3ccac13 Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Wed, 29 Jul 2026 11:48:38 +1200 Subject: [PATCH 3/4] Update cylc/flow/hostuserutil.py [skip ci] Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> --- cylc/flow/hostuserutil.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cylc/flow/hostuserutil.py b/cylc/flow/hostuserutil.py index ace028b5702..28c0306c0a5 100644 --- a/cylc/flow/hostuserutil.py +++ b/cylc/flow/hostuserutil.py @@ -126,10 +126,7 @@ def _get_host_info( if target is None: target = socket.getfqdn() if IS_MAC_OS and target in { - ( - '1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.' - '0.0.0.0.0.0.ip6.arpa' - ), + f'1.{"0." * 31}ip6.arpa', '1.0.0.127.in-addr.arpa', }: # Python's socket bindings don't play nicely with mac os From ba1ec45b93188e1d78eeebbcc3d24657ca7c4c81 Mon Sep 17 00:00:00 2001 From: Hilary James Oliver Date: Tue, 28 Jul 2026 23:52:32 +0000 Subject: [PATCH 4/4] Exclude buggy flake8 plugin version. --- setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index f74d924f793..911a4b10970 100644 --- a/setup.cfg +++ b/setup.cfg @@ -102,7 +102,8 @@ tests = flake8-builtins>=1.5.0 flake8-comprehensions>=3.5.0 flake8-debugger>=4.0.0 - flake8-implicit-str-concat>=0.4 + # https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/issues/82 + flake8-implicit-str-concat>=0.4,!=0.7.0 flake8-mutable>=1.2.0 flake8-simplify>=0.14.0; python_version<"3.14" flake8-type-checking