Bug 1559975 - Fix python3 lint issues on js/src, r=ahal
authorEdwin Gao <egao@mozilla.com>
Fri, 05 Jul 2019 14:34:55 +0000
changeset 544340 d0dda220d0d270babd2026b7f88ebd368fef4fa1
parent 544339 975200b42f28cad8be537ee8cb2721bb9817f0c0
child 544341 c2f8e46a5e3678ccd17e6690962b8d295c852d05
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())
 
 
 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())
 
 
 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
@@ -7,17 +7,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
         - modules/freetype2
         - security/manager/ssl
         - servo
         - testing/mochitest