Skip to content

Commit 67f05cd

Browse files
committed
Linting fixes
1 parent 2d21205 commit 67f05cd

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.pylintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[MESSAGES CONTROL]
2+
disable=too-many-arguments,unexpected-keyword-arg,pointless-string-statement
3+
max-line-length=120

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ python:
55
- "3.5"
66
- "3.6"
77
install: pip install -e .[dev]
8-
script: py.test test
8+
script: make test && make lint

wikia_common_kibana.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def __init__(
6666
since = now - period
6767
else:
6868
since += 1
69-
self._logger.info("Using provided {0} timestamp as since ({1} seconds ago)".format(since, now - since))
69+
self._logger.info("Using provided %s timestamp as since (%d seconds ago)", since, now - since)
7070

7171
self._since = since
7272
self._to = now - self.SHORT_DELAY # give logs some time to reach Logstash
@@ -78,9 +78,9 @@ def __init__(
7878
self.format_index(prefix=index_prefix, timestamp=now, sep=index_sep),
7979
])
8080

81-
self._logger.info("Using {} indices".format(self._index))
82-
self._logger.info("Querying for messages from between {} and {}".
83-
format(self.format_timestamp(self._since), self.format_timestamp(self._to)))
81+
self._logger.info("Using %s indices", self._index)
82+
self._logger.info("Querying for messages from between %s and %s",
83+
self.format_timestamp(self._since), self.format_timestamp(self._to))
8484

8585
@staticmethod
8686
def format_index(prefix, timestamp, sep='-'):
@@ -274,7 +274,7 @@ def get_aggregations(self, query, group_by, stats_field, percents=(50, 95, 99, 9
274274
# add @timestamp range
275275
body['query']['bool']['must'].append(self._get_timestamp_filer())
276276

277-
self._logger.info("Getting aggregations for {} field when grouped by {}".format(group_by, stats_field))
277+
self._logger.info("Getting aggregations for %s field when grouped by %s", group_by, stats_field)
278278

279279
res = self._es.search(
280280
body=body,

0 commit comments

Comments
 (0)