Skip to content

fix more ruff rule exclusions; ignore BLE001 intentionally - #25462

Merged
eviljeff merged 2 commits into
mozilla:masterfrom
eviljeff:00000-enable-more-ruff-rules-sept-18
Sep 21, 2026
Merged

eviljeff merged 2 commits into
mozilla:masterfrom
eviljeff:00000-enable-more-ruff-rules-sept-18

Conversation

@eviljeff

@eviljeff eviljeff commented Sep 18, 2026

Copy link
Copy Markdown
Member

Further follow-on work for mozilla/addons#16365

Description

Removes yet more ignored ruff rules, so we're closer to the standard list of ruff formatting/linting rules.

Context

  • Like the other follow-up patches, the method is: removing some rules from the ignore list, then asking Claude to fix, then checking the result to see if it makes sense to me. (I tinkered with a few fixes too)
  • This time re-enables "SIM115", "RUF059", "SIM102", and "FLY002". That will only leave RUF012 (345 errors) and UP031 (502) that are PR-sized pieces of work on their own - assuming we decide it's worth doing them.
  • "BLE001" was also investigated, but the majority of the errors were genuine cases where we wanted to specifically catch all exceptions, so I added it to the set of purposeful ignored rules rather than adding # noqa BLE001 to each occurrence. We can revisit that decision. (The fixes for BLE001 were retained in a few places, where a tighter exception was a good idea - those changes should be sense-checked by the reviewer of this patch too)

Testing

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@eviljeff
eviljeff marked this pull request as ready for review September 18, 2026 14:33
@eviljeff
eviljeff requested review from a team and chrstinalin and removed request for a team September 18, 2026 14:33
Comment thread src/olympia/addons/tests/test_decorators.py
Comment thread src/olympia/reviewers/views.py Outdated
@eviljeff
eviljeff merged commit 5592c45 into mozilla:master Sep 21, 2026
47 checks passed
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