Closed
Description
Bug description
consider
class X:
def __index__(self):
return 1
this will flag index as a bad dunder, even though it is valid to do.
Configuration
No response
Command used
pylint x.py
Pylint output
************* Module x
x.py:2:4: W3201: Bad or misspelled dunder method name __index__. (bad-dunder-name)
Expected behavior
no lint
Pylint version
% pylint --version
pylint 2.17.2
astroid 2.15.4
Python 3.10.11 (main, Apr 10 2023, 08:08:57) [GCC 8.3.0]
OS / Environment
No response
Additional dependencies
No response