Skip to content

Commit 1ade107

Browse files
author
alexander.prokhorov
committed
Black applied.
1 parent a07c578 commit 1ade107

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

channels_graphql_ws/graphql_ws_consumer.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ def __init__(self, *args, **kwargs):
226226
self._graphql_ws_subprotocol = None
227227

228228
# 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>', ...}
232232
self._sids_by_group = {} # {'<grp>': ['<sid0>', '<sid1>', ...], ...}
233233

234234
# Tasks which send notifications to clients indexed by an
@@ -913,9 +913,7 @@ async def consume_stream():
913913
# Respond with general error response.
914914
await self._send_gql_error(op_id, [ex])
915915

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[
919917
Optional[graphql.DocumentNode],
920918
Optional[graphql.OperationDefinitionNode],
921919
Optional[Iterable[graphql.GraphQLError]],
@@ -1286,9 +1284,11 @@ async def _send_gql_ping(self):
12861284
"""Send the `ping`/`ka` message to the client."""
12871285
await self.send_json(
12881286
{
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+
)
12921292
}
12931293
)
12941294

@@ -1326,9 +1326,11 @@ async def _send_gql_next(
13261326

13271327
await self.send_json(
13281328
{
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+
),
13321334
"id": op_id,
13331335
"payload": {
13341336
"data": data,

0 commit comments

Comments
 (0)