Chad has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/386211 )
Change subject: Pylint nitpicks: Whitespace/continuation fixes ...................................................................... Pylint nitpicks: Whitespace/continuation fixes --- M conftool/configuration.py M conftool/tests/integration/test_syncer.py M conftool/tests/integration/test_tool.py M conftool/tests/unit/test_syncer.py M conftool/tests/unit/test_types.py 5 files changed, 8 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/software/conftool refs/changes/11/386211/1 diff --git a/conftool/configuration.py b/conftool/configuration.py index a171c24..96f4a06 100644 --- a/conftool/configuration.py +++ b/conftool/configuration.py @@ -26,7 +26,7 @@ 'driver_options', 'tcpircbot_host', 'tcpircbot_port' - ]) + ]) class Config(ConfigBase): @@ -41,7 +41,7 @@ driver_options={}, tcpircbot_host='localhost', tcpircbot_port='9999' - ): + ): if pools_path.startswith('/'): raise ValueError("pools_path must be a relative path.") if services_path.startswith('/'): diff --git a/conftool/tests/integration/test_syncer.py b/conftool/tests/integration/test_syncer.py index 19d1239..6bce187 100644 --- a/conftool/tests/integration/test_syncer.py +++ b/conftool/tests/integration/test_syncer.py @@ -100,7 +100,7 @@ sync = syncer.Syncer('/nonexistent', basepath) sync.load() - nodes = self.node_generator(cluster, services.keys(), 10) + nodes = self.node_generator(cluster, services.keys(), 10) with temp_data(services, nodes) as basepath: sync = syncer.Syncer('/nonexistent', basepath) sync.load() diff --git a/conftool/tests/integration/test_tool.py b/conftool/tests/integration/test_tool.py index 0f03c67..2b92878 100644 --- a/conftool/tests/integration/test_tool.py +++ b/conftool/tests/integration/test_tool.py @@ -122,7 +122,7 @@ with self.assertRaises(SystemExit) as cm: tool.main(cmdline=args) self.assertEquals(cm.exception_code, 0) - self.assertEquals(tool.ToolCliByLabel.raise_warning.call_count,1) + self.assertEquals(tool.ToolCliByLabel.raise_warning.call_count, 1) # now let's loop through the responses from conftool get args = ['select', 'cluster=appservers', 'get'] for res in self.output_for(args): diff --git a/conftool/tests/unit/test_syncer.py b/conftool/tests/unit/test_syncer.py index d103c3a..28c4a35 100644 --- a/conftool/tests/unit/test_syncer.py +++ b/conftool/tests/unit/test_syncer.py @@ -61,8 +61,7 @@ KVObject.backend.driver.all_data.side_effect = KeyError() self.assertRaises(KeyError, e.get_changes, exp_data) # Test all list are as expected - KVObject.backend.driver.all_data = mock.Mock( - return_value = current_data) + KVObject.backend.driver.all_data = mock.Mock(return_value=current_data) to_add, to_remove = e.get_changes(exp_data) self.assertSetEqual(set(['dc1/clusterA/https/serv3']), to_add) self.assertSetEqual(set(['dc1/clusterA/https/serv4', 'dc1/clusterA/apache/serv3']), @@ -89,8 +88,7 @@ } } e = EntitySyncer('service', self.schema.entities['service']) - KVObject.backend.driver.all_data = mock.Mock( - return_value = live_data) + KVObject.backend.driver.all_data = mock.Mock(return_value=live_data) to_add, to_remove = e.get_changes(exp_data) self.assertSetEqual(to_remove, set()) self.assertSetEqual(to_add, set(['clusterA/apache2'])) @@ -100,7 +98,7 @@ e.get_changes = mock.Mock( return_value=(set(['dc1/clusterA/https/serv1', 'dc2/clusterB/https/serv2']), set(['dc1/clusterA/https/serv2']))) - obj = mock.Mock() + obj = mock.Mock() obj.exists = False obj.static_values = False e.cls = mock.Mock(return_value=obj) diff --git a/conftool/tests/unit/test_types.py b/conftool/tests/unit/test_types.py index e358405..3470500 100644 --- a/conftool/tests/unit/test_types.py +++ b/conftool/tests/unit/test_types.py @@ -22,7 +22,7 @@ def test_list_validator(self): validator = types.get_validator("list") - self.assertEquals(['abc', 1, 'may'], validator(['abc',1,'may'])) + self.assertEquals(['abc', 1, 'may'], validator(['abc', 1, 'may'])) self.assertEquals([], validator('abcdesf')) self.assertEquals([], validator('')) -- To view, visit https://gerrit.wikimedia.org/r/386211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idff93229fb6b7cb49579cc291dfa61c3ce1db22e Gerrit-PatchSet: 1 Gerrit-Project: operations/software/conftool Gerrit-Branch: master Gerrit-Owner: Chad <ch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits