summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Bartosh <eduard.bartosh@intel.com>2015-01-14 01:54:03 +0200
committerEd Bartosh <eduard.bartosh@intel.com>2015-01-23 14:51:32 +0200
commit3f442cb15a77c2dfe0f8f14b39f80dce58bf12b9 (patch)
tree0bd17317782ad28ce82e72b759e85cf2eca52099
parent3721e22667f4be23fa87dacf99e51f7a1db48edd (diff)
downloadrepa-3f442cb15a77c2dfe0f8f14b39f80dce58bf12b9.tar.gz
repa-3f442cb15a77c2dfe0f8f14b39f80dce58bf12b9.tar.bz2
repa-3f442cb15a77c2dfe0f8f14b39f80dce58bf12b9.zip
pylinting: Fix W0612 and W0613
Fixed 'Unused variable' and 'Unused argument' warnings Fixes: #2320 Change-Id: I52ef7310586a9fb6f2b003a138afc09f7246aab8 Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
-rw-r--r--repa/accept.py2
-rw-r--r--repa/common.py4
-rw-r--r--repa/diff.py2
-rwxr-xr-xrepa/group.py2
-rwxr-xr-xrepa/info.py4
-rw-r--r--repa/reject.py2
-rw-r--r--repa/rmgroup.py2
7 files changed, 9 insertions, 9 deletions
diff --git a/repa/accept.py b/repa/accept.py
index 8292f24..7c561da 100644
--- a/repa/accept.py
+++ b/repa/accept.py
@@ -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='')
diff --git a/repa/common.py b/repa/common.py
index a523e9f..20344aa 100644
--- a/repa/common.py
+++ b/repa/common.py
@@ -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
diff --git a/repa/diff.py b/repa/diff.py
index 8202848..d456bdd 100644
--- a/repa/diff.py
+++ b/repa/diff.py
@@ -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')
diff --git a/repa/group.py b/repa/group.py
index c7c079e..6b69f4d 100755
--- a/repa/group.py
+++ b/repa/group.py
@@ -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']:
diff --git a/repa/info.py b/repa/info.py
index be4693a..4fce363 100755
--- a/repa/info.py
+++ b/repa/info.py
@@ -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.
diff --git a/repa/reject.py b/repa/reject.py
index a907740..89bcbbe 100644
--- a/repa/reject.py
+++ b/repa/reject.py
@@ -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='')
diff --git a/repa/rmgroup.py b/repa/rmgroup.py
index c3eac2a..8c3a901 100644
--- a/repa/rmgroup.py
+++ b/repa/rmgroup.py
@@ -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')