Skip to content

Enforce ruff rules using pre-commit#484

Open
DimitriPapadopoulos wants to merge 9 commits into
en-wl:v2from
DimitriPapadopoulos:ruff
Open

Enforce ruff rules using pre-commit#484
DimitriPapadopoulos wants to merge 9 commits into
en-wl:v2from
DimitriPapadopoulos:ruff

Conversation

@DimitriPapadopoulos

@DimitriPapadopoulos DimitriPapadopoulos commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Use the pre-commit GitHub Action although:

this action is in maintenance-only mode and will not be accepting new features.

The alternative would be to give pre-commit.ci access to the repository.

Requires enabling GitHub Actions for this repository.

@DimitriPapadopoulos DimitriPapadopoulos changed the title Enforce ruff rules Enforce ruff rules using pre-commit Feb 18, 2026
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the ruff branch 3 times, most recently from 2ff848a to 3b46531 Compare February 18, 2026 13:06
Comment thread libscowl/_adjust.py Outdated
@DimitriPapadopoulos DimitriPapadopoulos force-pushed the ruff branch 2 times, most recently from add1480 to a7bd8e5 Compare February 22, 2026 09:51
@DimitriPapadopoulos DimitriPapadopoulos marked this pull request as ready for review February 22, 2026 09:52
@DimitriPapadopoulos

Copy link
Copy Markdown
Contributor Author

I would suggest using prek as a drop-in replacement for pre-commit.

The associated j178/prek-action is fully maintained.

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the ruff branch 2 times, most recently from f3a50ff to ca99bb4 Compare March 2, 2026 17:27
Unnecessary generator (rewrite as a set comprehension)
Unnecessary `map()` usage (rewrite using a generator expression)
Use a dictionary comprehension instead of a for-loop
Consider merging multiple comparisons
Use `sys.exit()` instead of `exit`
Use `elif` instead of `else` then `if`, to reduce indentation
Combine `if` branches using logical `or` operator
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