Skip to content

Commit

Permalink
Reformat with black 22.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Mar 28, 2022
1 parent bc9e571 commit fb6c715
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/trio-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@

import h11

MAX_RECV = 2 ** 16
MAX_RECV = 2**16
TIMEOUT = 10

################################################################
Expand Down
2 changes: 1 addition & 1 deletion h11/_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#
# Maybe a dict-of-lists would be better?

_content_length_re = re.compile(br"[0-9]+")
_content_length_re = re.compile(rb"[0-9]+")
_field_name_re = re.compile(field_name.encode("ascii"))
_field_value_re = re.compile(field_value.encode("ascii"))

Expand Down
2 changes: 1 addition & 1 deletion h11/_readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

# Remember that this has to run in O(n) time -- so e.g. the bytearray cast is
# critical.
obs_fold_re = re.compile(br"[ \t]+")
obs_fold_re = re.compile(rb"[ \t]+")


def _obsolete_line_fold(lines: Iterable[bytes]) -> Iterable[bytes]:
Expand Down
4 changes: 2 additions & 2 deletions h11/tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def thunk() -> NoReturn:


def test_validate() -> None:
my_re = re.compile(br"(?P<group1>[0-9]+)\.(?P<group2>[0-9]+)")
my_re = re.compile(rb"(?P<group1>[0-9]+)\.(?P<group2>[0-9]+)")
with pytest.raises(LocalProtocolError):
validate(my_re, b"0.")

Expand All @@ -66,7 +66,7 @@ def test_validate() -> None:


def test_validate_formatting() -> None:
my_re = re.compile(br"foo")
my_re = re.compile(rb"foo")

with pytest.raises(LocalProtocolError) as excinfo:
validate(my_re, b"", "oops")
Expand Down

0 comments on commit fb6c715

Please sign in to comment.