Skip to content

Fix flake8-bugbear B045 lint failures - #7558

Closed
ChrisPaulBennett wants to merge 1 commit into
cylc:8.7.xfrom
ChrisPaulBennett:fix-bugbear-b045
Closed

ChrisPaulBennett wants to merge 1 commit into
cylc:8.7.xfrom
ChrisPaulBennett:fix-bugbear-b045

Conversation

@ChrisPaulBennett

Copy link
Copy Markdown
Contributor

Fix flake8-bugbear B045 lint failures

flake8-bugbear 26.10.27 (released 2026-10-27) added rule B045:
"Loop control variable overrides a variable in an enclosing loop".
This is currently failing the lint job on all PRs against 8.7.x:

./cylc/flow/data_store_mgr.py:809:21: B045 Loop control variable key overrides a variable in an enclosing loop.
./cylc/flow/id_cli.py:516:23: B045 Loop control variable tokens overrides a variable in an enclosing loop.

The inner loop variables have been renamed:

  • data_store_mgr.py: key -> meta_key (family metadata loop).
  • id_cli.py: tokens -> expanded_tokens (workflow pattern expansion).

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.

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.

1 participant