summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-07-01 20:28:45 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-07-01 20:28:45 +0200
commitdd15dc4e6467be601706e8e1b79b15a37babce48 (patch)
tree8cbaa89aba2c2b738108afe399d0f4af0a725d83
parent6f066733e23a61d83580cd1898e6b8afab8fafea (diff)
downloadpylint-git-issue-3339.tar.gz
[no-member] Add functional tests for issue #3339issue-3339
-rw-r--r--tests/functional/n/no/no_member_with_metaclass.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/functional/n/no/no_member_with_metaclass.py b/tests/functional/n/no/no_member_with_metaclass.py
new file mode 100644
index 000000000..d5b0f93ae
--- /dev/null
+++ b/tests/functional/n/no/no_member_with_metaclass.py
@@ -0,0 +1,20 @@
+# pylint: disable=missing-docstring,too-few-public-methods
+
+
+class ParentMetaclass(type):
+ def __init__(cls, what, bases=None, attrs=None):
+ super().__init__(what, bases, attrs)
+ cls.aloha = "test"
+
+
+class Parent(metaclass=ParentMetaclass):
+ def handle(self):
+ raise NotImplementedError
+
+
+class Test(Parent):
+ def handle(self) -> None:
+ return self.aloha
+
+
+print(Test().handle())