John Vandenberg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/267660

Change subject: Remove multiple spaces before operator
......................................................................

Remove multiple spaces before operator

Allows pep8 rule E221 to be enabled.

Change-Id: I037ebefdeb05a890cf4b4c1af8a051be77a95594
---
M files/kafkatee_ganglia.py
M tox.ini
2 files changed, 9 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/kafkatee 
refs/changes/60/267660/1

diff --git a/files/kafkatee_ganglia.py b/files/kafkatee_ganglia.py
index 16cc994..f2fd2e8 100755
--- a/files/kafkatee_ganglia.py
+++ b/files/kafkatee_ganglia.py
@@ -153,15 +153,15 @@
     per_second_key_suffix = 'per_second'
 
     def __init__(self, stats_file='/var/cache/kafkatee/kafkatee.stats.json', 
key_separator='.'):
-        self.stats_file               = stats_file
-        self.key_separator            = key_separator
+        self.stats_file = stats_file
+        self.key_separator = key_separator
 
         # NOTE:  It might be more elegant to
         # store the JSON object as it comes back from stats_file,
         # rather than keeping the state in the flattened hash.
 
         # latest flattnened stats as read from stats_file
-        self.flattened_stats          = {}
+        self.flattened_stats = {}
         # previous flattened stats as read from stats_file
         self.flattened_stats_previous = {}
 
@@ -260,7 +260,7 @@
         JSON stats, not the time since update_stats() was last called.
         '''
         # The timestamp will be keyed as 'kafka.rdkafka.time'
-        timestamp_key = 
self.key_separator.join(key.split(self.key_separator)[0:2]  + ['time'])
+        timestamp_key = 
self.key_separator.join(key.split(self.key_separator)[0:2] + ['time'])
 
         # if we don't yet have a previous value from which to calculate a
         # rate, just return 0 for now
@@ -333,10 +333,10 @@
     global time_max
     global last_run_timestamp
 
-    stats_file     = params.get('stats_file', 
'/var/cache/kafkatee/kafkatee.stats.json')
-    key_separator  = params.get('key_separator', '.')
+    stats_file = params.get('stats_file', 
'/var/cache/kafkatee/kafkatee.stats.json')
+    key_separator = params.get('key_separator', '.')
     ganglia_groups = params.get('groups', 'kafka')
-    time_max       = int(params.get('tmax', time_max))
+    time_max = int(params.get('tmax', time_max))
 
     kafkatee_stats = KafkateeStats(stats_file, key_separator)
     # Run update_stats() so that we'll have a list of stats keys that will
@@ -565,7 +565,7 @@
         cmdline.print_help()
         cmdline.error("Must supply statsfile argument.")
 
-    cli_options.stats_file  = arguments[0]
+    cli_options.stats_file = arguments[0]
 
     # Turn the optparse.Value object into a regular dict
     # so we can pass it to metric_init
diff --git a/tox.ini b/tox.ini
index 776ee15..897a40b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,6 +13,5 @@
 
 [flake8]
 max-line-length = 150
-; E221 multiple spaces before operator
 ; E241 multiple spaces after ':'
-ignore = E221,E241
+ignore = E241

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I037ebefdeb05a890cf4b4c1af8a051be77a95594
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/kafkatee
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <[email protected]>

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

Reply via email to