blob: d5b0f93ae1fa5c51dbfced6afe62936619c01004 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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())
|