-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
fixesRelated to suggested fixes for violationsRelated to suggested fixes for violations
Description
some_string = "ruff"
raise ValueError(f"Hello {some_string}.")Running with ruff==0.0.263:
> ruff --fixable=EM102 --fix --select=EM102 a.py
a.py:2:18: EM102 Exception must not use an f-string literal, assign to variable first
Found 1 error.
It would be nice if EM102 supported autofix with msg like the rule explanation so:
some_string = "ruff"
msg = f"Hello {some_string}."
raise ValueError(msg)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixesRelated to suggested fixes for violationsRelated to suggested fixes for violations