Pylint nowadays prints something like this when it sees old-style classes:
C: 41, 0: Old-style class defined. (old-style-class)
Let's fix it globally by making all our classes to be of new style.
Change-Id: If9cd20bc85247a50aac140575b3e7b6d51a9a564
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
import io
from bmaptools import BmapCreate, BmapCopy, BmapHelpers, TransRead
-class NamedFile:
+class NamedFile(object):
"""
This simple class allows us to override the 'name' attribute of a file
object. The reason is that some classes use the 'name' attribute of the
"""
pass
-class BmapCopy:
+class BmapCopy(object):
"""
This class implements the bmap-based copying functionality. To copy an
image with bmap you should create an instance of this class, which requires
"""
pass
-class BmapCreate:
+class BmapCreate(object):
"""
This class implements the bmap creation functionality. To generate a bmap
for an image (which is supposedly a sparse file), you should first create
pass
-class _FilemapBase:
+class _FilemapBase(object):
"""
This is a base class for a couple of other classes in this module. This
class simply performs the common parts of the initialization process: opens
"""
pass
-class _CompressedFile:
+class _CompressedFile(object):
"""
This class implements transparent reading from a compressed file-like
object and decompressing its contents on-the-fly.
return result
-class TransRead:
+class TransRead(object):
"""
This class implement the transparent reading functionality. Instances of
this class are file-like objects which you can read and seek only forward.