Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 2c74d1a

Browse files
committed
Make the code more pep8-ish
1 parent 3a32468 commit 2c74d1a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

hyper/common/util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ..packages.rfc3986.uri import URIReference
1010
import re
1111

12+
1213
def to_bytestring(element):
1314
"""
1415
Converts a single string to a bytestring, encoding via UTF-8 if needed.
@@ -28,6 +29,7 @@ def to_bytestring_tuple(*x):
2829
"""
2930
return tuple(imap(to_bytestring, x))
3031

32+
3133
def to_host_port_tuple(host_port_str, default_port=80):
3234
"""
3335
Converts the given string containing a host and possibly a port

test/test_hyper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from io import BytesIO
3030
import hyper
3131

32+
3233
def decode_frame(frame_data):
3334
f, length = Frame.parse_frame_header(frame_data[:9])
3435
f.parse_body(memoryview(frame_data[9:9 + length]))
@@ -526,6 +527,7 @@ def test_that_using_proxy_keeps_http_headers_intact(self):
526527
(b':path', b'/'),
527528
]
528529

530+
529531
class TestServerPush(object):
530532
def setup_method(self, method):
531533
self.frames = []
@@ -1481,6 +1483,7 @@ def test_connection_error_when_send_out_of_range_frame(self):
14811483
with pytest.raises(ValueError):
14821484
c._send_cb(d)
14831485

1486+
14841487
# Some utility classes for the tests.
14851488
class NullEncoder(object):
14861489
@staticmethod
@@ -1497,13 +1500,15 @@ def to_str(v):
14971500
return '\n'.join("%s%s" % (to_str(name), to_str(val))
14981501
for name, val in headers)
14991502

1503+
15001504
class FixedDecoder(object):
15011505
def __init__(self, result):
15021506
self.result = result
15031507

15041508
def decode(self, headers):
15051509
return self.result
15061510

1511+
15071512
class DummySocket(object):
15081513
def __init__(self):
15091514
self.queue = []

0 commit comments

Comments
 (0)