Bug 1344844 - Enable flake8 rule E222: "multiple spaces after operator". r?dexter
This patch enables flake8 rule E222:
"multiple spaces after operator" in toolkit/components/telemetry
by removing the relative E222 entry from toolkit/components/telemetry/.flake8
and fixing the files for which the E222 error was reported.
Precisely 1 error violating E222 rule was found and solved.
MozReview-Commit-ID: 3xx09jkVu3E
--- a/toolkit/components/telemetry/.flake8
+++ b/toolkit/components/telemetry/.flake8
@@ -1,5 +1,5 @@
[flake8]
# See http://pep8.readthedocs.io/en/latest/intro.html#configuration
-ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E128, E501, E713, E222, E202, W602, E127, W601
+ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E128, E501, E713, E202, W602, E127, W601
max-line-length = 99
filename = *.py, +.lint
--- a/toolkit/components/telemetry/parse_scalars.py
+++ b/toolkit/components/telemetry/parse_scalars.py
@@ -231,17 +231,17 @@ class ScalarType:
def dataset(self):
"""Get the nsITelemetry constant equivalent to the chose release channel collection
policy for the scalar.
"""
# The collection policy is optional, but we still define a default
# behaviour for it.
release_channel_collection = \
self._definition.get('release_channel_collection', 'opt-in')
- return 'nsITelemetry::' + ('DATASET_RELEASE_CHANNEL_OPTOUT'
+ return 'nsITelemetry::' + ('DATASET_RELEASE_CHANNEL_OPTOUT'
if release_channel_collection == 'opt-out' else 'DATASET_RELEASE_CHANNEL_OPTIN')
@property
def cpp_guard(self):
"""Get the cpp guard for this scalar"""
return self._definition.get('cpp_guard')