We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useless-parent-delegation is reported on '__init__' method of class derived from 'Exception'. This '__init__' method, though, accepts no arguments except for 'self'. For regular classes following the same pattern (base class '__init__' accepts arbitrary additional arguments, derived class '__init__' accepts only 'self'), no warning is reported. a.py: class Base: def __init__(self, *args, **kwargs): pass class Derived(Base): # No warning def __init__(self): super().__init__() class MyException(Exception): # W0246: Useless parent or super() delegation in method '__init__' (useless-parent-delegation) def __init__(self): super().__init__()
### Configuration _No response_ ### Command used ```shell pylint a.py
************* Module a a.py:14:4: W0246: Useless parent or super() delegation in method '__init__' (useless-parent-delegation)
No warning for MyException 'init'.
pylint 3.2.5 astroid 3.2.3 Python 3.10.12 (main, Jul 29 2024, 16:56:48) [GCC 11.4.0]
Ubuntu 22.04.4
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug description
Pylint output
Expected behavior
No warning for MyException 'init'.
Pylint version
OS / Environment
Ubuntu 22.04.4
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: