pylinting: Fix W0612 and W0613
authorEd Bartosh <eduard.bartosh@intel.com>
Tue, 13 Jan 2015 23:54:03 +0000 (01:54 +0200)
committerEd Bartosh <eduard.bartosh@intel.com>
Fri, 23 Jan 2015 12:51:32 +0000 (14:51 +0200)
Fixed 'Unused variable' and 'Unused argument' warnings

Fixes: #2320
Change-Id: I52ef7310586a9fb6f2b003a138afc09f7246aab8
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
repa/accept.py
repa/common.py
repa/diff.py
repa/group.py
repa/info.py
repa/reject.py
repa/rmgroup.py

index 8292f24da9b4f38f80dc78159ba0f6ceccb829d1..7c561dab3c28279f90e642c519f18ec4f345f4c9 100644 (file)
@@ -44,7 +44,7 @@ class Accept(object):
     help = description
 
     @staticmethod
-    def add_arguments(parser, _config):
+    def add_arguments(parser, _):
         """Adds arguments to the parser. Called from [sub_]main."""
         parser.add_argument('submission', help='submission or group')
         parser.add_argument('-c', '--comment', help='comment', default='')
index a523e9fd65e6dd68b93e61f54c9366482bed57b1..20344aa9dc9f8da93e97e05c93b83aaaf18e0f17 100644 (file)
@@ -67,10 +67,10 @@ def get_project_by_name(obs, name, target):
 
 def _resolve_submissions(obs, name, target):
     """Get list of submissions with meta. Resolves submitgroups."""
-    project, meta, _bresults = get_project_by_name(obs, name, target)
+    project, meta = get_project_by_name(obs, name, target)[:2]
     if name.startswith('submitgroup'):
         for subm in meta['submissions']:
-            sprj, smeta, _bresults = get_project_by_name(obs, subm, target)
+            sprj, smeta = get_project_by_name(obs, subm, target)[:2]
             yield subm, sprj, smeta
     else:
         yield name, project, meta
index 820284887a187627e4e80f7288e4c6536efe331a..d456bdd07887015d0b03f6d68079036dae3a1729 100644 (file)
@@ -102,7 +102,7 @@ class Diff(object):
     help = description
 
     @staticmethod
-    def add_arguments(parser, _config):
+    def add_arguments(parser, _):
         """Adds arguments to the parser. Called from [sub_]main."""
         parser.add_argument('cmp_project', help='Compared OBS project')
         parser.add_argument('cmp_manifest', help='Manifest of compared project')
index c7c079e24af1a366ee75a2eaffbd9314af48a8ec..6b69f4d500fededc0b953e9dee8c2c352c2e51dd 100755 (executable)
@@ -57,7 +57,7 @@ def check_target_prj(submissions):
 
 def check_build_results(bresults):
     """Check if build targets are published."""
-    for subm, _prj, results in bresults:
+    for subm, _, results in bresults:
         for target, res in results.iteritems():
             if res['state'] != 'published' or res['code'] != 'published':
                 if res['packages']:
index be4693a54471732613568001dc2c4e1ad2afc085..4fce36371ea66e0fefca3167485e78811c5498a8 100755 (executable)
@@ -54,7 +54,7 @@ def get_status(results):
 def info(obs, name, target):
     """Print detailed info about submission or submitgroup."""
     is_group = name.startswith('submitgroup/')
-    _project, meta, build_results = get_project_by_name(obs, name, target)
+    _, meta, build_results = get_project_by_name(obs, name, target)
 
     print
     if is_group:
@@ -111,7 +111,7 @@ class Info(object):
     help = description
 
     @staticmethod
-    def add_arguments(parser, _config):
+    def add_arguments(parser, _):
         """
         Add arguments to the parser. Called from [sub_]main.
         Set defaults for arguments from config.
index a9077408638cb48ce81a83f359ae74b4beb24f2f..89bcbbec0cbcf1e939b8bd3c34b13f9a3afd2bed 100644 (file)
@@ -44,7 +44,7 @@ class Reject(object):
     help = description
 
     @staticmethod
-    def add_arguments(parser, _config):
+    def add_arguments(parser, _):
         """Adds arguments to the parser. Called from [sub_]main."""
         parser.add_argument('submission', help='submission or group')
         parser.add_argument('-c', '--comment', help='comment', default='')
index c3eac2a159faf9d16943a91d659f46b9396dcd4e..8c3a9014f341e2cee2dfb47dd123c2c22be1d820 100644 (file)
@@ -53,7 +53,7 @@ class RmGroup(object):
     help = description
 
     @staticmethod
-    def add_arguments(parser, _config):
+    def add_arguments(parser, _):
         """Adds arguments to the parser. Called from [sub_]main."""
         parser.add_argument('group', help='group of submissions')