Skip to content
Snippets Groups Projects
Commit 7d55e9d2 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fix protocol

parent 95c91ade
No related branches found
Tags v2.14.16
No related merge requests found
import typing as tp
try:
from typing import Protocol
except ImportError:
Protocol = tp.TypeVar('Protocol')
T = tp.TypeVar('T')
Iteratable = tp.Union[tp.Iterator[T], tp.Iterable[T]]
U = tp.TypeVar('U')
......@@ -12,7 +17,7 @@ Predicate = tp.Callable[[T], bool]
ExceptionClassType = tp.Type[Exception]
class Appendable(tp.Protocol[T]):
class Appendable(Protocol[T]):
def append(self, item: T) -> None:
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment