Inspectopedia
 
2024.3

Improper first parameter

Info
New
Last modified: 03 December 2024

Reports methods that lack the first parameter that is usually named self.

Example:

When the quick-fix is applied, the code changes to:

The inspection also reports naming issues in class methods.

Example:

Since the first parameter of a class method should be cls, the IDE provides a quick-fix to rename it.