File: _typing.py

package info (click to toggle)
python-grpclib 0.4.8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 484 kB
  • sloc: python: 3,370; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
from typing import Mapping, Any
from typing_extensions import Protocol

from . import const
from . import server


class IServable(Protocol):
    def __mapping__(self) -> Mapping[str, const.Handler]: ...


class ICheckable(Protocol):
    def __mapping__(self) -> Mapping[str, Any]: ...


class IClosable(Protocol):
    def close(self) -> None: ...


class IProtoMessage(Protocol):
    @classmethod
    def FromString(cls, s: bytes) -> 'IProtoMessage': ...

    def SerializeToString(self) -> bytes: ...


class IEventsTarget(Protocol):
    __dispatch__: Any  # FIXME: should be events._Dispatch


class IServerMethodFunc(Protocol):
    async def __call__(self, stream: 'server.Stream[Any, Any]') -> None: ...


class IReleaseStream(Protocol):
    def __call__(self) -> None: ...