Pylint for common/mapping.py
authorLingchaox Xin <lingchaox.xin@intel.com>
Tue, 4 Mar 2014 09:57:18 +0000 (17:57 +0800)
committerLingchaox Xin <lingchaox.xin@intel.com>
Wed, 5 Mar 2014 02:25:12 +0000 (10:25 +0800)
C: 36, 0: No space allowed around keyword argument assignment
    def __get_mapping(self, obj, branch = None):
                                        ^ (bad-whitespace)
C: 66, 0: No space allowed around keyword argument assignment
    def get_submit_mapping(self, project, branch = None):
                                                 ^ (bad-whitespace)
C: 11, 0: Old-style class defined. (old-style-class)

Change-Id: I399144061a1c564344cad68438fbb596b132da6d

common/mapping.py

index efb17af..34d1c57 100644 (file)
@@ -8,7 +8,7 @@ class MappingError(Exception):
     """Local exception class."""
     pass
 
-class Mapping():
+class Mapping(object):
     """A class to handle mapping xml file """
     def __init__(self, mapping_file):
         """ convert xml to git obj """
@@ -33,7 +33,7 @@ class Mapping():
                 dest.append(i)
         return dest
 
-    def __get_mapping(self, obj, branch = None):
+    def __get_mapping(self, obj, branch=None):
         """ get OBS target project under one object(project or path) """
 
         mapping = []
@@ -63,7 +63,7 @@ class Mapping():
                              brch.OBS_package]))
         return mapping
 
-    def get_submit_mapping(self, project, branch = None):
+    def get_submit_mapping(self, project, branch=None):
         """Get submit mapping though project or branch"""
         for prj in self.mapping_obj.project:
             if prj.name == project or prj.name == '/' + project: