Bug 1344853 - Enable flake8 rule E127: "continuation line over-indented for visual indent". r?dexter draft
authorKonstantin <kpstsp@gmail.com>
Thu, 16 Mar 2017 22:15:46 +0300
changeset 500186 31ee313858df
parent 500185 e1b0ff39b68d
child 549572 eec9c482bc21
push id49651
push userbmo:kpstsp@gmail.com
push dateThu, 16 Mar 2017 20:51:18 +0000
reviewersdexter
bugs1344853
milestone55.0a1
Bug 1344853 - Enable flake8 rule E127: "continuation line over-indented for visual indent". r?dexter MozReview-Commit-ID: GfcBe95NNNm
toolkit/components/telemetry/.flake8
toolkit/components/telemetry/gen-event-data.py
--- a/toolkit/components/telemetry/.flake8
+++ b/toolkit/components/telemetry/.flake8
@@ -1,6 +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, E703, E502, E128, E501, E713, E231, E111, E261, E222, E203, E201, E202, W602, F841, F401, W601
-#E127
 max-line-length = 99
 filename = *.py, +.lint
--- a/toolkit/components/telemetry/gen-event-data.py
+++ b/toolkit/components/telemetry/gen-event-data.py
@@ -70,49 +70,46 @@ def write_common_event_table(events, out
     print("const CommonEventInfo %s[] = {" % table_name, file=output)
     for e,extras in zip(events, extra_table):
         # Write a comment to make the file human-readable.
         print("  // category: %s" % e.category, file=output)
         print("  // methods: [%s]" % ", ".join(e.methods), file=output)
         print("  // objects: [%s]" % ", ".join(e.objects), file=output)
 
         # Write the common info structure
-        print(
-                "  {%d, %d, %d, %d, %d, %s, %s}," %
-                (string_table.stringIndex(e.category),
-                string_table.stringIndex(e.expiry_version),
-                extras[0], # extra keys index
-                extras[1], # extra keys count
-                e.expiry_day,
-                e.dataset,
-                " | ".join(e.record_in_processes_enum)),
-                file=output)
+        print("  {%d, %d, %d, %d, %d, %s, %s}," %
+              (string_table.stringIndex(e.category),
+              string_table.stringIndex(e.expiry_version),
+              extras[0], # extra keys index
+              extras[1], # extra keys count
+              e.expiry_day,
+              e.dataset,
+              " | ".join(e.record_in_processes_enum)),
+              file=output)
 
     print("};", file=output)
     static_assert(output, "sizeof(%s) <= UINT32_MAX" % table_name,
                   "index overflow")
 
 
 def write_event_table(events, output, string_table):
     table_name = "gEventInfo"
     print("const EventInfo %s[] = {" % table_name, file=output)
 
     for common_info_index,e in enumerate(events):
         for method_name, object_name in itertools.product(e.methods, e.objects):
-            print(
-                    "  // category: %s, method: %s, object: %s" %
-                    (e.category, method_name, object_name),
-                    file=output)
+            print("  // category: %s, method: %s, object: %s" %
+                  (e.category, method_name, object_name),
+                  file=output)
 
-            print(
-                    "  {gCommonEventInfo[%d], %d, %d}," %
-                    (common_info_index,
-                     string_table.stringIndex(method_name),
-                     string_table.stringIndex(object_name)),
-                    file=output)
+            print("  {gCommonEventInfo[%d], %d, %d}," %
+                  (common_info_index,
+                  string_table.stringIndex(method_name),
+                  string_table.stringIndex(object_name)),
+                  file=output)
 
     print("};", file=output)
     static_assert(output, "sizeof(%s) <= UINT32_MAX" % table_name,
                   "index overflow")
 
 
 def main(output, *filenames):
     # Load the event data.