Class methods should take
cls as the first argument.
@classmethod decorator converts the method to a class method.
When the class method is called, Python will implicitly pass in the class as the first argument, just like how an instance method receives the instance (
self, by convention).
While it is true that the first argument could be called anything, Python should be written to be read, and Python developers expect the first argument of class methods to be named
If our GitHub code review bot spots this issue in your pull request it gives this advice:
Code Review Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code
class-method-missing-cls in your pyproject.toml file.