Skip to content

Fix flake8 ISC004 violations. - #7403

Open
hjoliver wants to merge 4 commits into
cylc:8.6.xfrom
hjoliver:flake8-isc004
Open

Fix flake8 ISC004 violations.#7403
hjoliver wants to merge 4 commits into
cylc:8.6.xfrom
hjoliver:flake8-isc004

Conversation

@hjoliver

@hjoliver hjoliver commented Jul 27, 2026

Copy link
Copy Markdown
Member

New flake8 fails have appeared.

https://github.com/flake8-implicit-str-concat/flake8-implicit-str-concat/releases/tag/0.7.0

Add ISC004: unparenthesized implicit string concatenation in collection

ISC004

Checks for implicitly concatenated strings inside list, tuple, and set literals.

In collection literals, implicit string concatenation is often the result of a missing comma between elements, which can silently merge items together.

If the concatenation is intentional, wrap it in parentheses to make it explicit

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@hjoliver hjoliver added this to the 8.6.6 milestone Jul 27, 2026
@hjoliver hjoliver self-assigned this Jul 27, 2026
@hjoliver

hjoliver commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Yikes, the ISC004 advice (wrap intentional concatenations in parentheses) can only handle two-line concatenations.

flake8-implicit-str-concat/flake8-implicit-str-concat#82

Hopefully I haven't just made an ass of myself 😁

@MetRonnie MetRonnie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add this to setup.cfg to avoid the bug for the time being

flake8-implicit-str-concat>=0.4,!=0.7.0

Comment thread cylc/flow/hostuserutil.py Outdated
hjoliver and others added 2 commits July 29, 2026 11:48
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
@hjoliver

Copy link
Copy Markdown
Member Author

Good to go now @MetRonnie

I guess when this gets merged, the auto sync PR will conflict with removal of setup.cfg on master and prompt us to update pyproject.toml ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants