Make all classes to be of new style
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 20 Jan 2014 07:37:30 +0000 (09:37 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 21 Jan 2014 17:16:23 +0000 (19:16 +0200)
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>
bmaptool
bmaptools/BmapCopy.py
bmaptools/BmapCreate.py
bmaptools/Filemap.py
bmaptools/TransRead.py

index 047ddc3995f6812f5cd355cfbe7012463aeae513..0c6a3498e9b4b0679979262548602b9579badfd2 100755 (executable)
--- a/bmaptool
+++ b/bmaptool
@@ -64,7 +64,7 @@ import shutil
 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
index ebce45a86dfcb5a76ca89a458309068707c7c4f1..eedeafe09ac8d6bcb3ab249adae12135582372f0 100644 (file)
@@ -73,7 +73,7 @@ class Error(Exception):
     """
     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
index e562a537bfbc4bae7eeb8cddb7970d25b715fd10..6e9e2f9feefa6f7b32112b465c4db8f250cec3b7 100644 (file)
@@ -104,7 +104,7 @@ class Error(Exception):
     """
     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
index fcc2f2c3ad086c251a1d6bae7e99ecf36c174732..2c120bf0d687027fbd283feaed3dce5a075ea205 100644 (file)
@@ -42,7 +42,7 @@ class Error(Exception):
     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
index b7c575d7af1c5a1627ec25607701f37c41f3a55f..c0782ef48d9c3fe3dcf15249b424cf1a5089c4b3 100644 (file)
@@ -81,7 +81,7 @@ class Error(Exception):
     """
     pass
 
-class _CompressedFile:
+class _CompressedFile(object):
     """
     This class implements transparent reading from a compressed file-like
     object and decompressing its contents on-the-fly.
@@ -217,7 +217,7 @@ def _decode_sshpass_exit_code(code):
 
     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.