Skip to content

feat(lint): Replace black, isort, and flake8 with ruff#797

Merged
hneiva merged 1 commit into
mainfrom
hneiva/ruff-linting
May 20, 2026
Merged

feat(lint): Replace black, isort, and flake8 with ruff#797
hneiva merged 1 commit into
mainfrom
hneiva/ruff-linting

Conversation

@hneiva
Copy link
Copy Markdown
Contributor

@hneiva hneiva commented May 15, 2026

The tox -e check env now runs ruff check + ruff format --check; pyproject.toml carries a single [tool.ruff] block in place of [tool.black]
and [tool.isort]; the [flake8] section in tox.ini is removed.

Also fixes 18 pydocstyle (D-rule) violations that flake8_docstrings had been silently ignoring (the plugin was effectively a no-op without an explicit docstring-convention setting). One-time ruff format pass touched 7 files with cosmetic-only changes (long-call wrapping, implicit-string collapsing).

@hneiva hneiva requested a review from ahal May 15, 2026 20:24
@hneiva hneiva requested a review from a team as a code owner May 15, 2026 20:25
@hneiva hneiva force-pushed the hneiva/ruff-linting branch from 3990893 to 049a98f Compare May 15, 2026 20:25
@hneiva hneiva changed the title Replace black, isort, and flake8 with ruff feat(lint): Replace black, isort, and flake8 with ruff May 15, 2026
@hneiva
Copy link
Copy Markdown
Contributor Author

hneiva commented May 15, 2026

I did my best to review the function docs/explanations that claude generated. I'm happy to adjust if anyone thinks it's not good enough.

Copy link
Copy Markdown
Contributor

@Eijebong Eijebong left a comment

Choose a reason for hiding this comment

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

Would look better without the claude-isms.

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
The `tox -e check` env now runs `ruff check` + `ruff format --check`;
`pyproject.toml` carries a single `[tool.ruff]` block in place of `[tool.black]`
and `[tool.isort]`; the `[flake8]` section in tox.ini is removed.

Also fixes 18 pydocstyle (D-rule) violations that flake8_docstrings had been
silently ignoring (the plugin was effectively a no-op without an explicit
docstring-convention setting). One-time `ruff format` pass touched 7 files
with cosmetic-only changes (long-call wrapping, implicit-string collapsing).
@hneiva hneiva force-pushed the hneiva/ruff-linting branch from 049a98f to 64d49ea Compare May 19, 2026 18:24
@hneiva hneiva requested a review from Eijebong May 19, 2026 18:26
@hneiva hneiva enabled auto-merge May 19, 2026 20:31
@hneiva hneiva requested a review from a team May 20, 2026 17:40
Copy link
Copy Markdown
Contributor

@bhearsum bhearsum left a comment

Choose a reason for hiding this comment

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

In the future please separate out the tool change from the reformatting into separate commits for ease of review.

This is the second (I think?) repository these changes have happened in. It would be good to codify this in https://github.com/mozilla-releng/reps at some point.

@hneiva hneiva removed request for Eijebong and ahal May 20, 2026 18:40
@hneiva hneiva disabled auto-merge May 20, 2026 18:40
@hneiva hneiva dismissed Eijebong’s stale review May 20, 2026 18:41

cuz of reasons

@hneiva hneiva merged commit afa011f into main May 20, 2026
12 checks passed
@hneiva hneiva deleted the hneiva/ruff-linting branch May 20, 2026 18:41
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