Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: Fix flake8 issues
......................................................................


Fix flake8 issues

There should be no code change.

Change-Id: Ia5fd54d0285829603bd8b8749bc283d1db39f85a
---
M conftool/__init__.py
M conftool/cli/syncer.py
M conftool/cli/tool.py
M conftool/node.py
M conftool/tests/unit/test_cli_tool.py
M setup.py
6 files changed, 9 insertions(+), 10 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/conftool/__init__.py b/conftool/__init__.py
index 9a28331..afc68aa 100644
--- a/conftool/__init__.py
+++ b/conftool/__init__.py
@@ -7,8 +7,6 @@
 from conftool import drivers
 
 
-
-
 class KVObject(object):
     backend = None
     config = None
@@ -89,7 +87,7 @@
             setattr(self, key, validator(values[key]))
         except Exception as e:
             _log.info("Value for key %s is invalid: %s",
-                       key, e)
+                      key, e)
             if set_defaults:
                 val = self.get_default(key)
                 _log.warn("Setting %s to the default value %s",
diff --git a/conftool/cli/syncer.py b/conftool/cli/syncer.py
index c17b1e3..20f46de 100644
--- a/conftool/cli/syncer.py
+++ b/conftool/cli/syncer.py
@@ -178,7 +178,6 @@
         _log.critical("Invalid configuration: %s", e)
         sys.exit(1)
 
-
     files = tag_files(args.directory)
     # Load services data.
     servdata = {}
diff --git a/conftool/cli/tool.py b/conftool/cli/tool.py
index a7de85d..80d77cf 100644
--- a/conftool/cli/tool.py
+++ b/conftool/cli/tool.py
@@ -17,7 +17,7 @@
     warn = False
     if name == "all":
         all = KVObject.backend.driver.ls(cur_dir)
-        objlist = [k for (k,v) in all]
+        objlist = [k for (k, v) in all]
         if act == "get":
             print json.dumps(dict(all))
             return []
@@ -33,12 +33,13 @@
         except:
             _log.critical("Invalid regexp: %s", regex)
             sys.exit(1)
-        objlist = [k for (k,v) in KVObject.backend.driver.ls(cur_dir)]
+        objlist = [k for (k, v) in KVObject.backend.driver.ls(cur_dir)]
         retval = [objname for objname in objlist if r.match(objname)]
         warn = (len(objlist) <= 2 * len(retval))
     if warn and act in ['set', 'del']:
         raise_warning()
     return retval
+
 
 def raise_warning():
     if not sys.stdin.isatty() or not sys.stdout.isatty():
@@ -55,6 +56,7 @@
     print "Aborting"
     sys.exit(1)
 
+
 def main(cmdline=None):
     if cmdline is None:
         cmdline = list(sys.argv)
diff --git a/conftool/node.py b/conftool/node.py
index d3c2b9c..00808e8 100644
--- a/conftool/node.py
+++ b/conftool/node.py
@@ -22,7 +22,7 @@
 
     @classmethod
     def get(cls, cluster, servname):
-        key = "{}_{}".format(cluster,servname)
+        key = "{}_{}".format(cluster, servname)
         if key not in cls.services:
             cls.services[key] = Service(cluster, servname)
         return cls.services[key]
diff --git a/conftool/tests/unit/test_cli_tool.py 
b/conftool/tests/unit/test_cli_tool.py
index 2c094d1..586c413 100644
--- a/conftool/tests/unit/test_cli_tool.py
+++ b/conftool/tests/unit/test_cli_tool.py
@@ -4,6 +4,7 @@
 from conftool.tests.unit import MockBackend
 from conftool.cli import tool
 
+
 class TestCliTool(unittest.TestCase):
 
     def setUp(self):
@@ -12,7 +13,6 @@
 
     def _mock_list(self, values):
         KVObject.backend.driver.ls = mock.MagicMock(return_value=values)
-
 
     def test_get_hosts(self):
         """Tests getting the host list"""
@@ -25,7 +25,7 @@
         l = tool.host_list('simple', '/whatever', 'get')
         self.assertEquals(l, ['simple'])
         l = tool.host_list('all', '/whatever', 'dummy')
-        self.assertItemsEqual(l, [k for (k,v) in host_dir])
+        self.assertItemsEqual(l, [k for (k, v) in host_dir])
         l = tool.host_list('all', '/whatever', 'get')
         self.assertEquals(l, [])
         l = tool.host_list('re:.*\.local', '/whatever', 'get')
diff --git a/setup.py b/setup.py
index 033ba41..24bb96c 100755
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@
 setup(
     name='conftool',
     version='0.1.2',
-    description='Collection of tools to interoperate with distributed k/v 
stores',
+    description='Tools to interoperate with distributed k/v stores',
     author='Joe',
     author_email='[email protected]',
     url='https://github.com/wikimedia/operations-software-conftool',

-- 
To view, visit https://gerrit.wikimedia.org/r/222291
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5fd54d0285829603bd8b8749bc283d1db39f85a
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/conftool
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to