Ananto30/zero

View on GitHub
zero/encoder/protocols.py

Summary

Maintainability
A
0 mins
Test Coverage
from typing import Any, Protocol, runtime_checkable


@runtime_checkable
class Encoder(Protocol):  # pragma: no cover
    def encode(self, data: Any) -> bytes:
        ...

    def decode(self, data: bytes) -> Any:
        ...

    def decode_type(self, data: bytes, typ: Any) -> Any:
        ...