Skip to content

Commit 5686482

Browse files
author
Luke Bakken
committed
make grouchy linter happy
1 parent 8d5d14b commit 5686482

8 files changed

Lines changed: 13 additions & 23 deletions

File tree

riak/codecs/pbuf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ def encode_timeseries_query(self, table, query, interpolations=None):
774774
return Msg(mc, req.SerializeToString(), rc)
775775

776776
def decode_timeseries(self, resp, tsobj,
777-
convert_timestamp=False):
777+
convert_timestamp=False):
778778
"""
779779
Fills an TsObject with the appropriate data and
780780
metadata from a TsGetResp / TsQueryResp.
@@ -820,7 +820,7 @@ def decode_timeseries_col_type(self, col_type):
820820
raise RiakError(msg)
821821

822822
def decode_timeseries_row(self, tsrow, tscols=None,
823-
convert_timestamp=False):
823+
convert_timestamp=False):
824824
"""
825825
Decodes a TsRow into a list
826826

riak/codecs/ttb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def encode_timeseries_query(self, table, query, interpolations=None):
139139
return Msg(mc, encode(req), rc)
140140

141141
def decode_timeseries(self, resp_ttb, tsobj,
142-
convert_timestamp=False):
142+
convert_timestamp=False):
143143
"""
144144
Fills an TsObject with the appropriate data and
145145
metadata from a TTB-encoded TsGetResp / TsQueryResp.
@@ -173,7 +173,7 @@ def decode_timeseries(self, resp_ttb, tsobj,
173173
for resp_row in resp_rows:
174174
tsobj.rows.append(
175175
self.decode_timeseries_row(resp_row, resp_coltypes,
176-
convert_timestamp))
176+
convert_timestamp))
177177
else:
178178
raise RiakError(
179179
"Expected 3-tuple in response, got: {}".format(resp_data))

riak/tests/base.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import logging
3-
import os
43
import random
5-
import sys
64

75
from riak.client import RiakClient
86
from riak.tests import HOST, PROTOCOL, PB_PORT, HTTP_PORT, SECURITY_CREDS
@@ -46,15 +44,9 @@ def create_client(cls, host=None, http_port=None, pb_port=None,
4644
kwargs.update(cls.client_options)
4745

4846
logger = logging.getLogger()
49-
logger.debug("RiakClient(protocol='%s', host='%s', " +
50-
"pb_port='%d', http_port='%d', " +
51-
"credentials='%s', kwargs='%s')",
52-
protocol,
53-
host,
54-
pb_port,
55-
http_port,
56-
credentials,
57-
kwargs)
47+
logger.debug("RiakClient(protocol='%s', host='%s', pb_port='%d', "
48+
"http_port='%d', credentials='%s', kwargs='%s')",
49+
protocol, host, pb_port, http_port, credentials, kwargs)
5850

5951
return RiakClient(protocol=protocol,
6052
host=host,

riak/tests/test_timeseries_pbuf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def test_decode_data_from_query(self):
198198
'Timeseries not supported or RUN_TIMESERIES is 0')
199199
class TimeseriesPbufTests(IntegrationTestBase, unittest.TestCase):
200200
client_options = {'transport_options':
201-
{'use_ttb': False, 'ts_convert_timestamp': True}}
201+
{'use_ttb': False, 'ts_convert_timestamp': True}}
202202

203203
@classmethod
204204
def setUpClass(cls):

riak/tests/test_timeseries_ttb.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
from riak.ts_object import TsObject
1313
from riak.codecs.ttb import TtbCodec
1414
from riak.util import str_to_bytes, \
15-
unix_time_millis, datetime_from_unix_time_millis, \
16-
is_timeseries_supported
15+
unix_time_millis, is_timeseries_supported
1716
from riak.tests import RUN_TIMESERIES
1817
from riak.tests.base import IntegrationTestBase
1918

@@ -125,7 +124,7 @@ def test_encode_data_for_put(self):
125124
'Timeseries not supported or RUN_TIMESERIES is 0')
126125
class TimeseriesTtbTests(IntegrationTestBase, unittest.TestCase):
127126
client_options = {'transport_options':
128-
{'use_ttb': True, 'ts_convert_timestamp': True}}
127+
{'use_ttb': True, 'ts_convert_timestamp': True}}
129128

130129
@classmethod
131130
def setUpClass(cls):

riak/transports/tcp/stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def next(self):
187187
keys = []
188188
for tsrow in response.keys:
189189
keys.append(self.codec.decode_timeseries_row(tsrow,
190-
convert_timestamp=self._convert_timestamp))
190+
convert_timestamp=self._convert_timestamp))
191191

192192
return keys
193193

riak/transports/tcp/transport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def ts_get(self, table, key):
155155
resp_code, resp = self._request(msg, codec)
156156
tsobj = TsObject(self._client, table)
157157
codec.decode_timeseries(resp, tsobj,
158-
self._ts_convert_timestamp)
158+
self._ts_convert_timestamp)
159159
return tsobj
160160

161161
def ts_put(self, tsobj):
@@ -182,7 +182,7 @@ def ts_query(self, table, query, interpolations=None):
182182
resp_code, resp = self._request(msg, codec)
183183
tsobj = TsObject(self._client, table)
184184
codec.decode_timeseries(resp, tsobj,
185-
self._ts_convert_timestamp)
185+
self._ts_convert_timestamp)
186186
return tsobj
187187

188188
def ts_stream_keys(self, table, timeout=None):

riak/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import print_function
22

33
import datetime
4-
import decimal
54
import sys
65
import warnings
76

0 commit comments

Comments
 (0)