Skip to content

Commit aba9b96

Browse files
committed
Format with black
1 parent 1362168 commit aba9b96

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

aioapns/connection.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ async def send_notification(
435435
raise MaxAttemptsExceeded
436436

437437
async def _create_proxy_connection(
438-
self, apns_protocol_factory
438+
self, apns_protocol_factory
439439
) -> APNsBaseClientProtocol:
440440
assert self.proxy_host is not None, "proxy_host must be set"
441441
assert self.proxy_port is not None, "proxy_port must be set"
@@ -454,8 +454,9 @@ async def _create_proxy_connection(
454454
)
455455
await protocol.apns_connection_ready.wait()
456456

457-
assert protocol.apns_protocol is not None, \
458-
"protocol.apns_protocol could not be set"
457+
assert (
458+
protocol.apns_protocol is not None
459+
), "protocol.apns_protocol could not be set"
459460
return protocol.apns_protocol
460461

461462

@@ -471,15 +472,14 @@ def __init__(
471472
ssl_context: Optional[ssl.SSLContext] = None,
472473
proxy_host: Optional[str] = None,
473474
proxy_port: Optional[int] = None,
474-
475475
) -> None:
476476
super(APNsCertConnectionPool, self).__init__(
477477
topic=topic,
478478
max_connections=max_connections,
479479
max_connection_attempts=max_connection_attempts,
480480
use_sandbox=use_sandbox,
481481
proxy_host=proxy_host,
482-
proxy_port=proxy_port
482+
proxy_port=proxy_port,
483483
)
484484

485485
self.cert_file = cert_file
@@ -542,7 +542,7 @@ def __init__(
542542
max_connection_attempts=max_connection_attempts,
543543
use_sandbox=use_sandbox,
544544
proxy_host=proxy_host,
545-
proxy_port=proxy_port
545+
proxy_port=proxy_port,
546546
)
547547

548548
self.ssl_context = ssl_context or ssl.create_default_context()
@@ -610,9 +610,11 @@ def connection_made(self, transport):
610610
"Proxy connection made.",
611611
)
612612
self.transport = transport
613-
connect_request = (f"CONNECT {self.apns_host}:{self.apns_port} "
614-
f"HTTP/1.1\r\nHost: "
615-
f"{self.apns_host}\r\nConnection: close\r\n\r\n")
613+
connect_request = (
614+
f"CONNECT {self.apns_host}:{self.apns_port} "
615+
f"HTTP/1.1\r\nHost: "
616+
f"{self.apns_host}\r\nConnection: close\r\n\r\n"
617+
)
616618
self.transport.write(connect_request.encode("utf-8"))
617619

618620
def data_received(self, data):

0 commit comments

Comments
 (0)