Bug 1559975 - Fix python3 lint issues on js/src, r=ahal
☠☠ backed out by 64e93c6ae4e7 ☠ ☠
authorBastien Abadie <bastien@mozilla.com>
Mon, 24 Jun 2019 16:55:05 +0000
changeset 542800 bdb15150dc59c3c37682cdfa6e28e87d528e257c
parent 542799 16efad6310295331b8b93e2a45efedce05345f3b
child 542801 d59c1638431f260d99ce58db4b6c391071390055
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1559975
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1559975 - Fix python3 lint issues on js/src, r=ahal Differential Revision: https://phabricator.services.mozilla.com/D35243
js/src/devtools/automation/autospider.py
js/src/frontend/GenerateReservedWords.py
tools/lint/py3.yml
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -387,17 +387,17 @@ def need_updating_configure(configure):
 if not args.nobuild:
     CONFIGURE_ARGS += ' --enable-nspr-build'
     CONFIGURE_ARGS += ' --prefix={OBJDIR}/dist'.format(OBJDIR=POBJDIR)
 
     # Generate a configure script from configure.in.
     configure = os.path.join(DIR.js_src, 'configure')
     if need_updating_configure(configure):
         shutil.copyfile(configure + ".in", configure)
-        os.chmod(configure, 0755)
+        os.chmod(configure, 0o755)
 
     # Run configure
     if not args.noconf:
         run_command(['sh', '-c', posixpath.join(PDIR.js_src, 'configure') + ' ' + CONFIGURE_ARGS],
                     check=True)
 
     # Run make
     run_command('%s -w %s' % (MAKE, MAKEFLAGS), shell=True, check=True)
--- a/js/src/frontend/GenerateReservedWords.py
+++ b/js/src/frontend/GenerateReservedWords.py
@@ -82,17 +82,17 @@ def split_list_per_column(reserved_word_
     assert(len(reserved_word_list) != 0)
 
     column_dict = {}
     for item in reserved_word_list:
         index, word = item
         per_column = column_dict.setdefault(word[column], [])
         per_column.append(item)
 
-    return sorted(column_dict.items(), key=lambda (char, word): ord(char))
+    return sorted(column_dict.items(), key=lambda char, word: ord(char))
 
 
 def generate_letter_switch(opt, unprocessed_columns, reserved_word_list,
                            columns=None):
     assert(len(reserved_word_list) != 0)
 
     if not columns:
         columns = range(0, unprocessed_columns)
@@ -165,17 +165,17 @@ def split_list_per_length(reserved_word_
     assert(len(reserved_word_list) != 0)
 
     length_dict = {}
     for item in reserved_word_list:
         index, word = item
         per_length = length_dict.setdefault(len(word), [])
         per_length.append(item)
 
-    return sorted(length_dict.items(), key=lambda (length, word): length)
+    return sorted(length_dict.items(), key=lambda length, word: length)
 
 
 def generate_switch(opt, reserved_word_list):
     assert(len(reserved_word_list) != 0)
 
     line(opt, '/*')
     line(opt, ' * Generating switch for the list of {} entries:'.format(len(reserved_word_list)))
     for index, word in reserved_word_list:
--- a/tools/lint/py3.yml
+++ b/tools/lint/py3.yml
@@ -9,17 +9,16 @@ py3:
         - build
         - client.py
         - config
         - dom/bindings
         - dom/canvas/test
         - dom/media/test
         - gfx
         - ipc/ipdl
-        - js/src
         - layout/reftests
         - layout/style
         - layout/tools/reftest
         - media
         - memory/replace
         - modules/freetype2
         - python/safety
         - security/manager/ssl