-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
41d8cee
commit 1a500b8
Showing
6 changed files
with
165 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from typing import Protocol | ||
from .pb.commonpb.common_pb2 import Request | ||
from .pb.rpcpb.services_pb2_grpc import SliverRPCStub | ||
|
||
|
||
class PbWithRequestProp(Protocol): | ||
"""Protocol for protobuf with Request field""" | ||
|
||
@property | ||
def Request(self) -> Request: | ||
... | ||
|
||
|
||
class InteractiveObject(Protocol): | ||
"""Protocol for objects with interactive methods""" | ||
|
||
@property | ||
def timeout(self) -> int: | ||
... | ||
|
||
@property | ||
def _stub(self) -> SliverRPCStub: | ||
... | ||
|
||
def _request(self, pb: PbWithRequestProp) -> PbWithRequestProp: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.