-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Summary
https://play.ruff.rs/a6f026e4-bf4e-487f-89f2-dbfb25d991ac
import typing
raise typing.cast("Exception", None)The fix for EM101 is applied.
which becomes:
import typing
msg = "Exception"
raise typing.cast(msg, None)then the fix for TC006 is applied.
which becomes:
import typing
msg = "Exception"
raise typing.cast("msg", None)and it becomes a loop, since that introduces EM101 again.
Version
ruff 0.11.13 (5faf72a 2025-06-05)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingruleImplementing or modifying a lint ruleImplementing or modifying a lint rule