diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | pylint/checkers/typecheck.py | 2 | ||||
-rw-r--r-- | tests/functional/d/duplicate_bases.py | 5 |
3 files changed, 8 insertions, 1 deletions
@@ -61,6 +61,8 @@ Release date: Undefined Closes #3850 +* Don't show ``DuplicateBasesError`` for attribute access + What's New in Pylint 2.7.4? =========================== diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index 2da7c6151..e08cf15b7 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -985,6 +985,8 @@ accessed. Python regular expressions are accepted.", continue except AttributeError: continue + except astroid.DuplicateBasesError: + continue except astroid.NotFoundError: # This can't be moved before the actual .getattr call, # because there can be more values inferred and we are diff --git a/tests/functional/d/duplicate_bases.py b/tests/functional/d/duplicate_bases.py index 974f97584..51b329a4f 100644 --- a/tests/functional/d/duplicate_bases.py +++ b/tests/functional/d/duplicate_bases.py @@ -2,7 +2,7 @@ # pylint: disable=missing-docstring,too-few-public-methods,no-init
-class Duplicates(str, str): # [duplicate-bases]
+class Duplicates(str, str): # [duplicate-bases]
pass
@@ -13,3 +13,6 @@ class Alpha(str): class NotDuplicates(Alpha, str):
"""The error should not be emitted for this case, since the
other same base comes from the ancestors."""
+
+
+print(Duplicates.__mro__)
|