# Disable the following pylint recommendations:
# * Too few public methods (R0903)
+# * Too many statements (R0915)
+# * Too many branches (R0912)
# pylint: disable=R0903
+# pylint: disable=R0915
+# pylint: disable=R0912
VERSION = "3.0"
# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
+# * Too many arguments - R0913
+# * Too many statements (R0915)
# pylint: disable=R0902
+# pylint: disable=R0913
+# pylint: disable=R0915
import os
import stat
# false-positives for many of 'subprocess' class members, e.g.
# "Instance of 'Popen' has no 'wait' member".
# * Too many instance attributes (R0902)
+# * Too many branches (R0912)
+# * Too many local variables (R0914)
# pylint: disable=E1101
# pylint: disable=R0902
+# pylint: disable=R0912
+# pylint: disable=R0914
# A list of supported compression types
SUPPORTED_COMPRESSION_TYPES = ('bz2', 'gz', 'xz', 'tar.gz', 'tgz', 'tar.bz2',
import lzma
except ImportError:
try:
- from backports import lzma
+ from backports import lzma # pylint: disable=F0401
except ImportError:
raise Error("cannot import the \"lzma\" python module, "
"it's required for decompressing .xz files")
"""
# Disable the following pylint recommendations:
-# * Too many public methods - R0904
+# * Too many public methods (R0904)
+# * Too many local variables (R0914)
+# * Too many statements (R0915)
# pylint: disable=R0904
+# pylint: disable=R0914
+# pylint: disable=R0915
import os
import tempfile
# This is a work-around for Centos 6
try:
- import unittest2 as unittest
+ import unittest2 as unittest # pylint: disable=F0401
except ImportError:
import unittest
import lzma
except ImportError:
try:
- from backports import lzma
+ from backports import lzma # pylint: disable=F0401
except ImportError:
lzma_present = False
function for different sparse files.
"""
- def test(self):
+ def test(self): # pylint: disable=R0201
"""
The test entry point. Executes the '_do_test()' function for files of
different sizes, holes distribution and format.
"""
# Disable the following pylint recommendations:
-# * Too many public methods - R0904
+# * Too many public methods (R0904)
+# * Attribute 'XYZ' defined outside __init__ (W0201), because unittest
+# classes are not supposed to have '__init__()'
# pylint: disable=R0904
+# pylint: disable=W0201
import os
import shutil
# This is a work-around for Centos 6
try:
- import unittest2 as unittest
+ import unittest2 as unittest # pylint: disable=F0401
except ImportError:
import unittest
if supported_ver >= bmap_version:
writer = old_bmapcopy_class(self._f_image, self._f_copy, f_bmap)
writer.copy(True, True)
- except:
+ except: # pylint: disable=W0702
if supported_ver >= bmap_version_major:
# The BmapCopy which we are testing is supposed to support this
# version of bmap file format. However, bmap format version 1.4
# This is a work-around for Centos 6
try:
- import unittest2 as unittest
+ import unittest2 as unittest # pylint: disable=F0401
except ImportError:
import unittest
function for different sparse files.
"""
- def test(self):
+ def test(self): # pylint: disable=R0201
"""
The test entry point. Executes the '_do_test()' function for files of
different sizes, holes distribution and format.