Pylint raises the warning: Useless super delegation in method '__init__' (useless-super-delegation) for the SpecificError class below.
class MyProjectExceptions(Exception):
"""The base class for all my project's exceptions."""
def __init__(self, message, func):
super(MyProjectExceptions, self).__init__(message) # Normal exception handling
self.func = func # Error origin for logging
class SpecificError(MyProjectExceptions):
"""Raise when a specific error occurs."""
def __init__(self, message, func):
super(SpecificError, self).__init__(message, func)
What is the correct way to pass the parameters to the superclass here?