-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
This might be incredibly easy to fix depending on how this check is implemented. Currently RUF027 can be triggered by something like:
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from datetime import date
path = "foo/{date}/" # RUF027Now, to be fair, this would also be a false positive for a runtime binding. But this seems like an easy low hanging fruit to reduce the false positive rate at least a little bit.
Although a more reliable solution long-term would be to add a setting for specifying additional methods which expect a template string.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ruleImplementing or modifying a lint ruleImplementing or modifying a lint rule