From f223c6de3a39eae6d1c76e30b55da28639dd8777 Mon Sep 17 00:00:00 2001 From: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com> Date: Mon, 24 Apr 2023 20:26:18 +0200 Subject: Fix a false positive for ``bad-dunder-name`` when there is a user-defined ``__index__`` method. (#8619) Closes #8613 --- pylint/constants.py | 1 + 1 file changed, 1 insertion(+) (limited to 'pylint') diff --git a/pylint/constants.py b/pylint/constants.py index c6f40936b..5bf4abf5c 100644 --- a/pylint/constants.py +++ b/pylint/constants.py @@ -231,6 +231,7 @@ EXTRA_DUNDER_METHODS = [ "__getnewargs_ex__", "__getnewargs__", "__getstate__", + "__index__", "__setstate__", "__reduce__", "__reduce_ex__", -- cgit v1.2.1