浏览代码

run black on updated files

Denis Mazur 4 年之前
父节点
当前提交
632c20ce93
共有 1 个文件被更改,包括 9 次插入11 次删除
  1. 9 11
      hivemind/p2p/p2p_daemon.py

+ 9 - 11
hivemind/p2p/p2p_daemon.py

@@ -424,12 +424,11 @@ class P2P:
 
     # only registers request-response handlers
     async def _add_protobuf_unary_handler(
-            self,
-            handle_name: str,
-            handler: Callable[[TInputProtobuf, P2PContext], Awaitable[TOutputProtobuf]],
-            input_protobuf_type: type,
+        self,
+        handle_name: str,
+        handler: Callable[[TInputProtobuf, P2PContext], Awaitable[TOutputProtobuf]],
+        input_protobuf_type: type,
     ) -> None:
-
         async def _unary_handler(request: bytes) -> bytes:
             input_serialized = input_protobuf_type().FromString(request)
             context = P2PContext(
@@ -464,17 +463,16 @@ class P2P:
         return response
 
     async def _call_unary_protobuf_handler(
-            self,
-            peer_id: PeerID,
-            handle_name: str,
-            input: TInputProtobuf,
-            output_protobuf_type: type,
+        self,
+        peer_id: PeerID,
+        handle_name: str,
+        input: TInputProtobuf,
+        output_protobuf_type: type,
     ) -> Awaitable[TOutputProtobuf]:
         serialized_input = input.SerializeToString()
         response = await self.unary_call(peer_id, handle_name, serialized_input)
         return output_protobuf_type().FromString(response)
 
-
     def iterate_protobuf_handler(
         self,
         peer_id: PeerID,