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

Commit c79e63a

Browse files
author
Junchao Wu
committed
fix flake8 issues
1 parent 4a16692 commit c79e63a

File tree

10 files changed

+22
-33
lines changed

10 files changed

+22
-33
lines changed

tchannel/handler.py

-4
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ def handle_pre_call(self, message_id, message, connection):
9494
:param message_id: message id
9595
:param message: CallRequestMessage or CallRequestContinueMessage
9696
:param connection: tornado connection
97-
98-
:except InvalidChecksumException:
99-
Raise InvalidChecksumException when the checksum in the message
100-
is wrong.
10197
"""
10298
try:
10399
req = connection.request_message_factory.build(message_id, message)

tchannel/thrift/transport/tornado_base.py

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
from toro import Queue
3939

4040

41-
4241
class TChannelTornadoTransportBase(TChannelTransportBase):
4342
"""A Thrift Transport to send requests over an open TChannel connection.
4443

tchannel/tornado/connection.py

-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
import toro as queues
5050

5151

52-
5352
log = logging.getLogger('tchannel')
5453

5554

tchannel/tornado/stream.py

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
from toro import Condition
3737

3838

39-
4039
@tornado.gen.coroutine
4140
def read_full(stream):
4241
"""Read the full contents of the given stream into memory.

tchannel/zipkin/formatters.py

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import json
4949

5050

51-
5251
def hex_str(n):
5352
return '%0.16x' % (n,)
5453

tests/integration/test_client_server.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ def test_tornado_client_with_server_not_there(random_open_port):
5656
# increase the LARGE_AMOUNT to even bigger
5757
@pytest.mark.gen_test
5858
@pytest.mark.parametrize('arg2, arg3', [
59-
("", big_arg()),
60-
(big_arg(), ""),
61-
("test", big_arg()),
62-
(big_arg(), "test"),
63-
(big_arg(), big_arg()),
64-
("", ""),
65-
("test", "test"),
66-
],
59+
("", big_arg()),
60+
(big_arg(), ""),
61+
("test", big_arg()),
62+
(big_arg(), "test"),
63+
(big_arg(), big_arg()),
64+
("", ""),
65+
("test", "test"),
66+
],
6767
ids=lambda arg: str(len(arg))
6868
)
6969
def test_tchannel_call_request_fragment(tchannel_server,

tests/integration/tornado/test_connection_reuse.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ def reverse(request, response, opts):
9090
@gen.coroutine
9191
def loop2(n):
9292
results = yield [
93-
server2.request(hostport1).send(
93+
server2.request(hostport1).send(
9494
InMemStream('reverse'),
9595
InMemStream(),
9696
InMemStream('foo')
97-
) for i in xrange(n)
97+
) for i in xrange(n)
9898
]
9999
for resp in results:
100100
body = yield resp.get_body()

tests/integration/trace/test_zipkin_trace.py

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
from StringIO import StringIO
3737

3838

39-
40-
41-
4239
@tornado.gen.coroutine
4340
def handler2(request, response, proxy):
4441
response.set_body_s(InMemStream("from handler2"))

tests/test_handler.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def req():
3838
request.service = ""
3939
request.checksum = None
4040
request.argstreams = [
41-
InMemStream("test"),
42-
InMemStream(),
43-
InMemStream()
44-
]
41+
InMemStream("test"),
42+
InMemStream(),
43+
InMemStream()
44+
]
4545
request.tracing = Trace()
4646
request.id = 0
4747
request.argstreams[0].close()

tests/test_messages.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,14 @@ def test_equality_check_against_none(init_request_with_headers):
247247
# increase the LARGE_AMOUNT to even bigger
248248
@pytest.mark.gen_test
249249
@pytest.mark.parametrize('arg2, arg3', [
250-
("", big_arg()),
251-
(big_arg(), ""),
252-
("test", big_arg()),
253-
(big_arg(), "test"),
254-
(big_arg(), big_arg()),
255-
("", ""),
256-
("test", "test"),
257-
],
250+
("", big_arg()),
251+
(big_arg(), ""),
252+
("test", big_arg()),
253+
(big_arg(), "test"),
254+
(big_arg(), big_arg()),
255+
("", ""),
256+
("test", "test"),
257+
],
258258
ids=lambda arg: str(len(arg))
259259
)
260260
def test_message_fragment(arg2, arg3, connection):

0 commit comments

Comments
 (0)