Skip to content

Commit d2fef11

Browse files
authored
Format with black 23.3.0
1 parent cdccbef commit d2fef11

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/trio-server.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def format_date_time(dt=None):
106106
# I/O adapter: h11 <-> trio
107107
################################################################
108108

109+
109110
# The core of this could be factored out to be usable for trio-based clients
110111
# too, as well as servers. But as a simplified pedagogical example we don't
111112
# attempt this here.
@@ -212,6 +213,7 @@ def info(self, *args):
212213
# Server main loop
213214
################################################################
214215

216+
215217
# General theory:
216218
#
217219
# If everything goes well:
@@ -276,6 +278,7 @@ async def http_serve(stream):
276278
# Actual response handlers
277279
################################################################
278280

281+
279282
# Helper function
280283
async def send_simple_response(wrapper, status_code, content_type, body):
281284
wrapper.info("Sending", status_code, "response with", len(body), "bytes")

h11/_connection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class PAUSED(Sentinel, metaclass=Sentinel):
5757
# - Apache: <8 KiB per line>
5858
DEFAULT_MAX_INCOMPLETE_EVENT_SIZE = 16 * 1024
5959

60+
6061
# RFC 7230's rules for connection lifecycles:
6162
# - If either side says they want to close the connection, then the connection
6263
# must close.

h11/tests/test_connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ def test_pipelining() -> None:
594594

595595

596596
def test_protocol_switch() -> None:
597-
for (req, deny, accept) in [
597+
for req, deny, accept in [
598598
(
599599
Request(
600600
method="CONNECT",
@@ -721,7 +721,7 @@ def setup() -> ConnectionPair:
721721
def test_close_simple() -> None:
722722
# Just immediately closing a new connection without anything having
723723
# happened yet.
724-
for (who_shot_first, who_shot_second) in [(CLIENT, SERVER), (SERVER, CLIENT)]:
724+
for who_shot_first, who_shot_second in [(CLIENT, SERVER), (SERVER, CLIENT)]:
725725

726726
def setup() -> ConnectionPair:
727727
p = ConnectionPair()

h11/tests/test_io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ def check(got: Any) -> None:
125125

126126

127127
def test_writers_simple() -> None:
128-
for ((role, state), event, binary) in SIMPLE_CASES:
128+
for (role, state), event, binary in SIMPLE_CASES:
129129
tw(WRITERS[role, state], event, binary)
130130

131131

132132
def test_readers_simple() -> None:
133-
for ((role, state), event, binary) in SIMPLE_CASES:
133+
for (role, state), event, binary in SIMPLE_CASES:
134134
tr(READERS[role, state], binary, event)
135135

136136

0 commit comments

Comments
 (0)