-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Given the following code:
logger = Logger()
logger.warning(f"{database_name} database not available.")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.
Logger().warning(f"{database_name} database not available.")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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule