pylint fixes

- temporarily ignore kafka/consumer/group.py
  - temporarily ignore test/test_protocol.py
  - disable-msg deprecated; use disable= instead
This commit is contained in:
Dana Powers
2015-12-10 17:48:12 -08:00
parent 5cf60f4482
commit 1cb732aba1
6 changed files with 7 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
#pylint: skip-file
from __future__ import absolute_import
from collections import namedtuple

View File

@@ -664,7 +664,7 @@ class KafkaConsumer(object):
# Otherwise we should re-raise the upstream exception
# b/c it typically includes additional data about
# the request that triggered it, and we do not want to drop that
raise # pylint: disable-msg=E0704
raise # pylint: disable=E0704
(offset, ) = self.get_partition_offsets(topic, partition,
request_time_ms, max_num_offsets=1)

View File

@@ -1,7 +1,7 @@
from __future__ import absolute_import
try:
from itertools import zip_longest as izip_longest, repeat # pylint: disable-msg=E0611
from itertools import zip_longest as izip_longest, repeat # pylint: disable=E0611
except ImportError:
from itertools import izip_longest as izip_longest, repeat # python 2
import logging
@@ -167,7 +167,7 @@ class SimpleConsumer(Consumer):
# Otherwise we should re-raise the upstream exception
# b/c it typically includes additional data about
# the request that triggered it, and we do not want to drop that
raise # pylint: disable-msg=E0704
raise # pylint: disable=E0704
# send_offset_request
log.info('Resetting topic-partition offset to %s for %s:%d',

View File

@@ -21,7 +21,7 @@ class Struct(AbstractType):
self.encode = self._encode_self
@classmethod
def encode(cls, item): # pylint: disable-msg=E0202
def encode(cls, item): # pylint: disable=E0202
bits = []
for i, field in enumerate(cls.SCHEMA.fields):
bits.append(field.encode(item[i]))

View File

@@ -8,7 +8,7 @@ import time
from six.moves import urllib
import uuid
from six.moves.urllib.parse import urlparse # pylint: disable-msg=E0611,F0401
from six.moves.urllib.parse import urlparse # pylint: disable=E0611,F0401
from test.service import ExternalService, SpawnedService
from test.testutil import get_open_port

View File

@@ -1,3 +1,4 @@
#pylint: skip-file
from contextlib import contextmanager
import struct