@@ -226,9 +226,9 @@ def __init__(self, *args, **kwargs):
226
226
self ._graphql_ws_subprotocol = None
227
227
228
228
# Registry of active (subscribed) subscriptions.
229
- self ._subscriptions : Dict [
230
- int , GraphqlWsConsumer . _SubInf
231
- ] = {} # {'<sid>': '<SubInf>', ...}
229
+ self ._subscriptions : Dict [int , GraphqlWsConsumer . _SubInf ] = (
230
+ {}
231
+ ) # {'<sid>': '<SubInf>', ...}
232
232
self ._sids_by_group = {} # {'<grp>': ['<sid0>', '<sid1>', ...], ...}
233
233
234
234
# Tasks which send notifications to clients indexed by an
@@ -913,9 +913,7 @@ async def consume_stream():
913
913
# Respond with general error response.
914
914
await self ._send_gql_error (op_id , [ex ])
915
915
916
- async def _on_gql_subscribe__parse_query (
917
- self , op_name : str , query : str
918
- ) -> Tuple [
916
+ async def _on_gql_subscribe__parse_query (self , op_name : str , query : str ) -> Tuple [
919
917
Optional [graphql .DocumentNode ],
920
918
Optional [graphql .OperationDefinitionNode ],
921
919
Optional [Iterable [graphql .GraphQLError ]],
@@ -1286,9 +1284,11 @@ async def _send_gql_ping(self):
1286
1284
"""Send the `ping`/`ka` message to the client."""
1287
1285
await self .send_json (
1288
1286
{
1289
- "type" : "ping"
1290
- if self ._graphql_ws_subprotocol == "graphql-transport-ws"
1291
- else "ka"
1287
+ "type" : (
1288
+ "ping"
1289
+ if self ._graphql_ws_subprotocol == "graphql-transport-ws"
1290
+ else "ka"
1291
+ )
1292
1292
}
1293
1293
)
1294
1294
@@ -1326,9 +1326,11 @@ async def _send_gql_next(
1326
1326
1327
1327
await self .send_json (
1328
1328
{
1329
- "type" : "next"
1330
- if self ._graphql_ws_subprotocol == "graphql-transport-ws"
1331
- else "data" ,
1329
+ "type" : (
1330
+ "next"
1331
+ if self ._graphql_ws_subprotocol == "graphql-transport-ws"
1332
+ else "data"
1333
+ ),
1332
1334
"id" : op_id ,
1333
1335
"payload" : {
1334
1336
"data" : data ,
0 commit comments