1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
from abc import ABC, abstractmethod class MyType(ABC): @abstractmethod def fun_a(self): pass @abstractmethod def factorial(self, x: int) -> int: pass class MyClass1(MyType): other: int = None def __init__(self): MyType.__init__(self, "asdf")