Lint methods which have "self" argument but don't use it. #4550
Labels
A-lint
Area: New lints
L-complexity
Lint: Belongs in the complexity lint group
L-suggestion
Lint: Improving, adding or fixing lint suggestions
If we have a code like this:
We could highlight "unused self" and advise to refactor it to a static method or a function. The same lint has been in
Python
language for a decade, I believe.Note: if the
self
argument is unused within a trait, we should not lint this, because this becomes a part of a generic interface, which could have been done intentionally.The text was updated successfully, but these errors were encountered: