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
|
# ValueError on list.remove() if the exithandler no longer
|
||||||
# exists is fine here
|
# exists is fine here
|
||||||
try:
|
try:
|
||||||
atexit._exithandlers.remove((self._cleanup_func, (self,), {}))
|
atexit._exithandlers.remove( # pylint: disable=no-member
|
||||||
|
(self._cleanup_func, (self,), {}))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ from __future__ import absolute_import
|
|||||||
try:
|
try:
|
||||||
from itertools import zip_longest as izip_longest, repeat # pylint: disable=E0611
|
from itertools import zip_longest as izip_longest, repeat # pylint: disable=E0611
|
||||||
except ImportError:
|
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
|
import logging
|
||||||
try:
|
try:
|
||||||
import queue # python 3
|
import queue # python 3
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import logging
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from queue import Empty, Full, Queue
|
from queue import Empty, Full, Queue # pylint: disable=import-error
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from Queue import Empty, Full, Queue
|
from Queue import Empty, Full, Queue # pylint: disable=import-error
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|
||||||
from threading import Thread, Event
|
from threading import Thread, Event
|
||||||
@@ -444,7 +444,8 @@ class Producer(object):
|
|||||||
# ValueError on list.remove() if the exithandler no longer exists
|
# ValueError on list.remove() if the exithandler no longer exists
|
||||||
# but that is fine here
|
# but that is fine here
|
||||||
try:
|
try:
|
||||||
atexit._exithandlers.remove((self._cleanup_func, (self,), {}))
|
atexit._exithandlers.remove( # pylint: disable=no-member
|
||||||
|
(self._cleanup_func, (self,), {}))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import copyreg
|
import copyreg # pylint: disable=import-error
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import copy_reg as copyreg # python2
|
import copy_reg as copyreg # pylint: disable=import-error
|
||||||
|
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info < (2, 7):
|
if sys.version_info < (2, 7):
|
||||||
import unittest2 as unittest
|
import unittest2 as unittest # pylint: disable=import-error
|
||||||
else:
|
else:
|
||||||
import unittest
|
import unittest
|
||||||
|
|||||||
Reference in New Issue
Block a user