-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule G004 doesn't work with inline instantiated logger #11031
Labels
rule
Implementing or modifying a lint rule
Comments
Yeah, our heuristics doesn't check for a direct instantiation ruff/crates/ruff_python_semantic/src/analyze/logging.rs Lines 7 to 65 in 6979dad
We could support this by updating the heuristic to include |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the following code:
the ruff linter will complain about G004 ("Logging statement uses f-string").
But given an inline instantiation of the logger, there is no such warning.
The "G" rule (flake8-logging-format) needs to be enabled.
My ruff version is 0.3.1.
I searched for G004 but none of the existing issues cover this. The answer might be similar to #6353 (comment) but I do think that this is something which could be covered.
The text was updated successfully, but these errors were encountered: