mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
31 lines
467 B
Python
31 lines
467 B
Python
from typing import Protocol
|
|
|
|
|
|
class MyProtocol(Protocol):
|
|
attr: int
|
|
|
|
def func(self, p: int) -> str:
|
|
pass
|
|
|
|
|
|
class MyClass1(MyProtocol):
|
|
def __init__(self, attr: int) -> None:
|
|
self.attr = attr
|
|
|
|
|
|
def func(self, p: int) -> str:
|
|
pass
|
|
|
|
|
|
class MyClass2(MyProtocol):
|
|
attr: int
|
|
|
|
def func(self, p: int) -> str:
|
|
pass
|
|
|
|
|
|
class HisProtocol(MyProtocol, Protocol):
|
|
attr: int
|
|
|
|
def func(self, p: int) -> str:
|
|
pass |