Enable flake8-logging-format (G) linting rules via Ruff#5930
Enable flake8-logging-format (G) linting rules via Ruff#5930uvindusl wants to merge 10 commits intomozilla:masterfrom
Conversation
suhaibmujahid
left a comment
There was a problem hiding this comment.
Thank you! Please fix the failing linting errors. Installing pre-commit will allow you to test that locally.
BTW. The PR enables all flake8-logging-format (G) rules, but this is fine. I will update the PR title to reflect that.
| dev = [ | ||
| "ruff>=0.15.10", | ||
| ] |
There was a problem hiding this comment.
We do not need to add ruff as a dependency here; we use it through pre-commit.
There was a problem hiding this comment.
i have removed ruff dependency with new changes
suhaibmujahid
left a comment
There was a problem hiding this comment.
@uvindusl the lint task is still failing. Could you please fix it so we can merge this PR?
Also, consider running pre-commit locally; it'll help you catch errors faster instead of waiting on CI.
| exclude: ^tests/fixtures/ | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.9 | ||
| rev: v0.15.10 |
There was a problem hiding this comment.
This change is out of the scope of this PR. Please drop it.
Overview
This PR addresses issue #5792 by enabling and fixing violations of the Ruff lint rule G004 (logging-f-string). f-strings in logger calls have been replaced with lazy %-style formatting to improve performance and adhere to Mozilla's logging standards.
Changes