-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
There are cases where _ cannot be used to mark a throwaway variable and it would be great if ruff allowed configuring it. This is common in projects that use gettext for example, as _ is used for translating strings there. One of the ways unused variables are marked in such projects is using __ (double underscore) but it probably would be a good idea to just make it configurable with a sane default to appeal to more uses.
Notably, pylint allows configuring the dummy variable pattern with a regex:
https://pylint.pycqa.org/en/latest/user_guide/configuration/all-options.html#dummy-variables-rgx
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels