Skip to content

Switch from using flake8 to using flake8 + ruff - #431

Open
fabi200123 wants to merge 2 commits into
cloudbase:masterfrom
fabi200123:switch-to-ruff
Open

Switch from using flake8 to using flake8 + ruff#431
fabi200123 wants to merge 2 commits into
cloudbase:masterfrom
fabi200123:switch-to-ruff

Conversation

@fabi200123

@fabi200123 fabi200123 commented May 15, 2026

Copy link
Copy Markdown
Contributor

This PR contains 2 commits:

  • First one adds ruff + flake8 instead of just flake8 for verifying the coding style
  • Second commit contains the formatted code from tox -e fmt, plus the fix of changing of the following error:
coriolis git:(switch-to-ruff) tox -e fmt                                     
fmt: commands[0]> ruff check --fix /Users/fabian/Documents/CBSL/coriolis
E741 Ambiguous variable name: `l`
   --> coriolis/osmorphing/base.py:341:26
    |
340 |         add = [p[0] for p in itertools.chain.from_iterable(
341 |                [l for k, l in self._packages.items() if k in k_add])]
    |                          ^
342 |
343 |         # If the second value in the tuple is True, the package must
    |

E741 Ambiguous variable name: `l`
   --> coriolis/osmorphing/base.py:346:29
    |
344 |         # be uninstalled on export
345 |         remove = [p[0] for p in itertools.chain.from_iterable(
346 |                   [l for k, l in self._packages.items()])
    |                             ^
347 |                   if p[1]]
    |

Found 234 errors (232 fixed, 2 remaining).
fmt: exit 1 (0.45 seconds) /Users/fabian/Documents/CBSL/coriolis> ruff check --fix /Users/fabian/Documents/CBSL/coriolis pid=45407
  fmt: FAIL code 1 (0.55=setup[0.10]+cmd[0.45] seconds)
  evaluation failed :( (0.68 seconds)

Changing it to pkgs for k, pkgs in self._packages.items() if k in k_add

@fabi200123
fabi200123 force-pushed the switch-to-ruff branch 2 times, most recently from 3a5b975 to 4bc248c Compare May 18, 2026 12:56
Comment thread tox.ini
Comment thread ruff.toml
Comment thread tox.ini Outdated
@fabi200123
fabi200123 force-pushed the switch-to-ruff branch 2 times, most recently from 2a28de8 to c58c82f Compare June 30, 2026 10:20
@fabi200123
fabi200123 marked this pull request as draft July 20, 2026 09:49
@fabi200123
fabi200123 marked this pull request as ready for review July 30, 2026 08:48
@fabi200123 fabi200123 changed the title Switch from using flake8 to using ruff Switch from using flake8 to using flake8 + ruff Jul 30, 2026
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.

2 participants