-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Milestone
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
Metadata
Metadata
Assignees
Labels
False Positive 🦟A message is emitted but nothing is wrong with the codeA message is emitted but nothing is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation