-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
From what I read in the original PR, the rule is meant to ignore string literals that have an immediate method call on them to avoid false positives, but from what I'm seeing, every line with a method call is completely ignored, even if the method is not invoked on the string itself. Is this intended behavior?
Sample code:
import logging
class Test:
def method(self, arg):
pass
name = "john"
print("hello {name}") # correctly fails
logging.info("hello {name}") # should fail but doesn't
Test().method("hello {name}") # also should fail but doesn'tInvoked with:
ruff --isolated --select RUF027 --preview thing.py
Ruff version:
ruff 0.2.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working