Code cleanup
authorEd Bartosh <eduard.bartosh@intel.com>
Sun, 14 Dec 2014 14:28:21 +0000 (16:28 +0200)
committerEd Bartosh <eduard.bartosh@intel.com>
Sun, 14 Dec 2014 14:37:54 +0000 (16:37 +0200)
Fixed pylint warnings

Change-Id: If091039bc80cd0b314eab7223753dc91ca8dd630
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
examples/namespace/setup.py
examples/plugin/setup.py
repa/common.py
repa/group.py
repa/info.py
repa/obs.py
setup.py

index 735fed16ceee874eb5950e807d0557f20c10bba5..5ce86e533aa03d0ed3f68f23e28c8381f0f33755 100644 (file)
@@ -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']
 )
index 46fb4e5909f39df290bab6c198cecc8dc96d216d..11a1df446b26ae6e1bd0635dd2dfa0c3a25669dd 100644 (file)
@@ -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']
       }
 )
index d77ed705473b080a04f122398add48000b87b875..630dc6a0738fcdc09feed31c9691d47dd8461a1d 100644 (file)
@@ -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',
index 4a9c2e99d865c356a8392e259968927910b67e46..10d6a0a433a1740f596a04c2bf80c049b62fd85f 100755 (executable)
@@ -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
index f609f2da9c3ea7e0a79e0714ee5f0c8c05e91f12..be4693a54471732613568001dc2c4e1ad2afc085 100755 (executable)
@@ -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:
index 3c5cdc20e01ed755892e2df42e9a10fa5e2102f1..dd3d37338d1da5249d092a17f9c244472dfce287 100644 (file)
@@ -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):
         """
index cbe523666d27d3d051d01aab48e4570301b8f587..7c8ebbd477c943b962b20af31a175351ed59241c 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -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',