Disable pylint errors for py2/py3 compatibility workarounds
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user