Skip to content

ALL-OVER0002 · evidence

This page continues ALL-OVER0002 directly from its source docstring. Read its implementation.

Each finding names the subclass, the base, the member, and the parameter list each side states. The value is the number of positions that changed name.

A name that begins with two underscores is left alone, because Python either rewrites it into the class that wrote it or calls it itself. A setter is left alone too, since the assigned value reaches it as an argument the reader never wrote. A parameter named as a placeholder is not a name any caller was ever meant to use, so replacing it is not a rename.

Once the two parameter lists stop lining up nothing is renamed, because the positions no longer correspond and the changed count is the whole of what happened. A positional-only parameter is never renamed either, since no caller can name it. A keyword-only parameter is reached by its name alone, so changing it deletes one parameter and adds another, which the differing-arguments rule reports as a changed set. The receiver of a class method leaves the comparison, because the descriptor supplies it and no call site can pass it.

  • Generalizes Pylint W0237 arguments-renamed. Open reference
  • Cites “Clean Code”, chapter 2, use intention-revealing names
  • Cites “A Behavioral Notion of Subtyping”, 1994