I'm building my own all-in-one component for a dash app based on the example in the dash documentation.
My implementation works fine, but pylint throws as excepted the E0213:no-self-argument error for all callbacks, as the callbacks are defined as class methods but do not have or use the "self" argument.
What would be the best or pythonic solution to counteract those errors? My ideas are:
@staticmethod
. This requires further changes necessary as the ids
class is no longer acessible, so all those calls must be changed to MyOnAIO.ids.id_name(...)
.There is no rule of thumb for this, but generally speaking, class member methods with no reference to the class itself should be marked as static methods. If you don't specify the method as static then that is totally fine but it would be considered a code-smell.
However, you can still disable pylint warnings as you mentioned earlier as follows # pylint: disable=E0213