diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-11-05 16:54:26 +0100 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-11-05 21:26:53 +0100 |
commit | 0a1ebd488fcdf7bf306615aba29e401ce49e3e10 (patch) | |
tree | b7d08cf00ff9255e12fa4f1a7571cd9ff53f1676 /tests | |
parent | 96e84595194073ea54a8c7730b86125049c0f4f9 (diff) | |
download | pylint-git-0a1ebd488fcdf7bf306615aba29e401ce49e3e10.tar.gz |
Fix crash on checking private members on ``__class__``
Closes #5261
Diffstat (limited to 'tests')
-rw-r--r-- | tests/functional/u/unused/unused_private_member.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/functional/u/unused/unused_private_member.py b/tests/functional/u/unused/unused_private_member.py index 319a06d88..fc42ea8fb 100644 --- a/tests/functional/u/unused/unused_private_member.py +++ b/tests/functional/u/unused/unused_private_member.py @@ -300,3 +300,12 @@ class Pony: def lookup_attribute(mapping, key): return mapping[key] + + +# Test for regression on checking __class__ attribute +# See: https://github.com/PyCQA/pylint/issues/5261 +class Foo: + __ham = 1 + + def method(self): + print(self.__class__.__ham) |