Pylint warning for “useless super delegation”

If you call the SpecificError class it will look for an __init__. If it doesn’t exist it will call the parent’s __init__. There is no need to add an __init__ here, since it’s exactly the same like the parent class. It is basically code duplication.

You should do:

class SpecificError(MyProjectExceptions):
    """Raise when a specific error occurs."""

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)