diff options
author | Ed Bartosh <eduard.bartosh@intel.com> | 2014-12-14 16:28:21 +0200 |
---|---|---|
committer | Ed Bartosh <eduard.bartosh@intel.com> | 2014-12-14 16:37:54 +0200 |
commit | a5ebb76f5bf4d39eb017763334e965759b20a86d (patch) | |
tree | ee2dd2d206fdf13184028c0cb96e0832b755e28f | |
parent | 14de9b6ca66f689781ae1514c8c0e6a45520c05b (diff) | |
download | repa-a5ebb76f5bf4d39eb017763334e965759b20a86d.tar.gz repa-a5ebb76f5bf4d39eb017763334e965759b20a86d.tar.bz2 repa-a5ebb76f5bf4d39eb017763334e965759b20a86d.zip |
Code cleanup
Fixed pylint warnings
Change-Id: If091039bc80cd0b314eab7223753dc91ca8dd630
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
-rw-r--r-- | examples/namespace/setup.py | 12 | ||||
-rw-r--r-- | examples/plugin/setup.py | 14 | ||||
-rw-r--r-- | repa/common.py | 2 | ||||
-rwxr-xr-x | repa/group.py | 5 | ||||
-rwxr-xr-x | repa/info.py | 3 | ||||
-rw-r--r-- | repa/obs.py | 6 | ||||
-rwxr-xr-x | setup.py | 16 |
7 files changed, 29 insertions, 29 deletions
diff --git a/examples/namespace/setup.py b/examples/namespace/setup.py index 735fed1..5ce86e5 100644 --- a/examples/namespace/setup.py +++ b/examples/namespace/setup.py @@ -31,10 +31,10 @@ Setup module from setuptools import setup -setup(name = "repa_namespace_package", - version = '0.0.1', - author = 'Ed Bartosh', - author_email = 'eduard.bartosh@intel.com', - packages = ['repa'], - namespace_packages = ['repa'] +setup(name="repa_namespace_package", + version='0.0.1', + author='Ed Bartosh', + author_email='eduard.bartosh@intel.com', + packages=['repa'], + namespace_packages=['repa'] ) diff --git a/examples/plugin/setup.py b/examples/plugin/setup.py index 46fb4e5..11a1df4 100644 --- a/examples/plugin/setup.py +++ b/examples/plugin/setup.py @@ -30,12 +30,12 @@ Setup module for example repa plugin from setuptools import setup -setup(name = "repa_plugin", - version = '0.0.1', - author = 'Ed Bartosh', - author_email = 'eduard.bartosh@intel.com', - packages = ['repa_plugin'], - entry_points = { - 'repa_commands': ['repa_plugin = repa_plugin.plugin:Test'] +setup(name="repa_plugin", + version='0.0.1', + author='Ed Bartosh', + author_email='eduard.bartosh@intel.com', + packages=['repa_plugin'], + entry_points={ + 'repa_commands': ['repa_plugin = repa_plugin.plugin:Test'] } ) diff --git a/repa/common.py b/repa/common.py index d77ed70..630dc6a 100644 --- a/repa/common.py +++ b/repa/common.py @@ -143,7 +143,7 @@ def retry(exceptions, tries=10, sleep=1): return wrap return decorator -class Colorizer: +class Colorizer(object): """Colorize text with ANSI colors.""" colors = {'black': '\033[90m', 'red': '\033[91m', 'green': '\033[92m', 'yellow': '\033[93m', diff --git a/repa/group.py b/repa/group.py index 4a9c2e9..10d6a0a 100755 --- a/repa/group.py +++ b/repa/group.py @@ -122,7 +122,7 @@ def aggregate(obs, bresults, gproject, processes): """Aggregate packages into group project.""" def notify(out, submission, result): """Callback, called by apply_async.""" - pkg = result[1] + pkg = result[1] out.write('aggregated: %s/%s\n' % (submission, pkg)) aggregated = set() obs.set_global_flag('publish', 'disable', gproject) @@ -203,7 +203,8 @@ class Group(object): parser.add_argument('-c', '--comment', help='comment', default='') parser.add_argument('-f', '--force', action='store_true', help='force group creation') - parser.add_argument('--noaggregate', default=config.get('noaggregate', ''), + parser.add_argument('--noaggregate', + default=config.get('noaggregate', ''), help='do not aggregate packages matching regexp') @staticmethod diff --git a/repa/info.py b/repa/info.py index f609f2d..be4693a 100755 --- a/repa/info.py +++ b/repa/info.py @@ -30,7 +30,6 @@ Get list of submissions. """ import sys -import os from collections import defaultdict @@ -84,7 +83,7 @@ def info(obs, name, target): if 'images' in meta: print print 'Images:' - for img in meta ['images']: + for img in meta['images']: print ' %-40s %s' % (img['name'], img['status']) if build_results: diff --git a/repa/obs.py b/repa/obs.py index 3c5cdc2..dd3d373 100644 --- a/repa/obs.py +++ b/repa/obs.py @@ -211,9 +211,9 @@ class OBS(OSC): url = core.makeurl(self.apiurl, ['request'], query) root = ET.parse(self.core_http(core.http_GET, url)) - for sr in root.findall('request'): - yield sr.get('id'), sr.find('state').get('name'), \ - sr.find('description').text + for req in root.findall('request'): + yield req.get('id'), req.find('state').get('name'), \ + req.find('description').text def set_global_flag(self, flag, value, prj, pkg=None): """ @@ -30,17 +30,17 @@ Setup module import os from setuptools import setup -setup(name = "repa", - version = '0.3~0.dev', - author = 'Ed Bartosh', - author_email = 'eduard.bartosh@intel.com', - packages = ['repa'], - namespace_packages = ['repa'], - data_files = [ +setup(name="repa", + version='0.3~0.dev', + author='Ed Bartosh', + author_email='eduard.bartosh@intel.com', + packages=['repa'], + namespace_packages=['repa'], + data_files=[ ('share/doc/packages/repa/', ['README']), ('share/man/man1/', ['repa.1']), (['/etc', 'etc'][bool(os.getenv('VIRTUAL_ENV'))], ['repa.conf'])], - entry_points = { + entry_points={ 'console_scripts': ['repa = repa.main:main'], 'repa_commands': ['list = repa.list:List', 'group = repa.group:Group', |