diff options
-rw-r--r-- | kafka/consumer/base.py | 3 | ||||
-rw-r--r-- | kafka/consumer/simple.py | 2 | ||||
-rw-r--r-- | kafka/producer/base.py | 7 | ||||
-rw-r--r-- | kafka/protocol/pickle.py | 4 | ||||
-rw-r--r-- | test/__init__.py | 2 |
5 files changed, 10 insertions, 8 deletions
diff --git a/kafka/consumer/base.py b/kafka/consumer/base.py index 4ac8c66..a90038f 100644 --- a/kafka/consumer/base.py +++ b/kafka/consumer/base.py @@ -197,7 +197,8 @@ class Consumer(object): # ValueError on list.remove() if the exithandler no longer # exists is fine here try: - atexit._exithandlers.remove((self._cleanup_func, (self,), {})) + atexit._exithandlers.remove( # pylint: disable=no-member + (self._cleanup_func, (self,), {})) except ValueError: pass diff --git a/kafka/consumer/simple.py b/kafka/consumer/simple.py index 9c2812b..946e9c7 100644 --- a/kafka/consumer/simple.py +++ b/kafka/consumer/simple.py @@ -3,7 +3,7 @@ from __future__ import absolute_import try: 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 + from itertools import izip_longest as izip_longest, repeat # pylint: disable=E0611 import logging try: import queue # python 3 diff --git a/kafka/producer/base.py b/kafka/producer/base.py index d733172..4f5edbc 100644 --- a/kafka/producer/base.py +++ b/kafka/producer/base.py @@ -5,9 +5,9 @@ import logging import time try: - from queue import Empty, Full, Queue + from queue import Empty, Full, Queue # pylint: disable=import-error except ImportError: - from Queue import Empty, Full, Queue + from Queue import Empty, Full, Queue # pylint: disable=import-error from collections import defaultdict from threading import Thread, Event @@ -444,7 +444,8 @@ class Producer(object): # ValueError on list.remove() if the exithandler no longer exists # but that is fine here try: - atexit._exithandlers.remove((self._cleanup_func, (self,), {})) + atexit._exithandlers.remove( # pylint: disable=no-member + (self._cleanup_func, (self,), {})) except ValueError: pass diff --git a/kafka/protocol/pickle.py b/kafka/protocol/pickle.py index 2265efd..b7e5264 100644 --- a/kafka/protocol/pickle.py +++ b/kafka/protocol/pickle.py @@ -1,9 +1,9 @@ from __future__ import absolute_import try: - import copyreg + import copyreg # pylint: disable=import-error except ImportError: - import copy_reg as copyreg # python2 + import copy_reg as copyreg # pylint: disable=import-error import types diff --git a/test/__init__.py b/test/__init__.py index c4d1e80..da1069f 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,6 +1,6 @@ import sys if sys.version_info < (2, 7): - import unittest2 as unittest + import unittest2 as unittest # pylint: disable=import-error else: import unittest |