diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-08-10 22:37:00 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-08-12 08:59:31 +0200 |
commit | bad3bdebffc3fb7732bbfb4eb6b67f9052a5dfd4 (patch) | |
tree | f218b6d065762589895e67e6428ca87004a15e44 | |
parent | 678d4f10ae3fcd9396360a5cff3e084aae31e830 (diff) | |
download | pylint-git-bad3bdebffc3fb7732bbfb4eb6b67f9052a5dfd4.tar.gz |
Add a regression test for #4823
-rw-r--r-- | tests/functional/c/class_attributes.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/functional/c/class_attributes.py b/tests/functional/c/class_attributes.py index b6fd4601e..1d41f9d7a 100644 --- a/tests/functional/c/class_attributes.py +++ b/tests/functional/c/class_attributes.py @@ -1,6 +1,6 @@ """Test that valid class attribute doesn't trigger errors""" __revision__ = 'sponge bob' -# pylint: disable=useless-object-inheritance +# pylint: disable=useless-object-inheritance,missing-docstring,too-few-public-methods class Clazz(object): "dummy class" @@ -16,3 +16,17 @@ class Clazz(object): def do_nothing(self): "I do nothing useful" return self.topic + 56 + + +class Base: + _class_prop: int + + +class Child(Base): + _class_prop = 42 + + def method(self): + print(self._class_prop) + + +Child().method() |