-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
acceptedReady for implementationReady for implementationhelp wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
#8489 changes F841 so that it complains about unused variables resulting from tuple unpacking.
There are a few issues:
- It's not clear to all folks that this can be disabled by prefixing the variable with an underscore (and unlike other cases, you can't just get rid of the variable / var name is often good documentation)
An autofix to automatically add the underscore prefix would help!Implemented in F841: support fixing unused assignments in tuples by renaming variables #9107- We actually currently mark F841 as unfixable, because it often keeps the RHS around (in case of side effect), and this is usually not the fix we want. So maybe both autofix and a custom error message?
- Maybe best option is separate error code. A good parallel is how
B007is separate fromF841. This also helps if you don't find the new lint useful, which I don't really
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acceptedReady for implementationReady for implementationhelp wantedContributions especially welcomeContributions especially welcomeruleImplementing or modifying a lint ruleImplementing or modifying a lint rule