From dd15dc4e6467be601706e8e1b79b15a37babce48 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Thu, 1 Jul 2021 20:28:45 +0200 Subject: [no-member] Add functional tests for issue #3339 --- tests/functional/n/no/no_member_with_metaclass.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/functional/n/no/no_member_with_metaclass.py 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()) -- cgit v1.2.1