mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Bug 1559975 - Make config/ lint with 'py2' and 'py3' r=catlee
Depends on D36091 Differential Revision: https://phabricator.services.mozilla.com/D36092 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
7a37d64346
commit
baa089903e
@ -2,6 +2,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import time
|
||||
import zipfile
|
||||
@ -47,7 +48,7 @@ class ZipFile(zipfile.ZipFile):
|
||||
date_time=time.localtime(time.time()))
|
||||
zinfo.compress_type = self.compression
|
||||
# Add some standard UNIX file access permissions (-rw-r--r--).
|
||||
zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L
|
||||
zinfo.external_attr = (0x81a4 & 0xFFFF) << 16
|
||||
else:
|
||||
zinfo = zinfo_or_arcname
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
# JSErrorFormatString.format member should be in ASCII encoding.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
|
@ -7,6 +7,7 @@
|
||||
# This script checks bytecode documentation in js/src/vm/Opcodes.h
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
|
@ -20,6 +20,7 @@
|
||||
# proper methods annotations.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import difflib
|
||||
|
@ -9,6 +9,7 @@
|
||||
# not, an error message is printed, quoting ERROR_LOCATION, which should
|
||||
# probably be the filename and line number of the erroneous call to
|
||||
# check_source_count.py.
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
import re
|
||||
|
@ -35,7 +35,7 @@
|
||||
# isolation, but don't try to do any order checking between such blocks.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import absolute_import, print_function
|
||||
|
||||
import difflib
|
||||
import os
|
||||
|
@ -36,6 +36,7 @@
|
||||
# mismatched alloc/free checking.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
|
@ -6,6 +6,7 @@
|
||||
# longer present in a complete update. The current working directory is used for
|
||||
# the location to enumerate and to create the precomplete file.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
2
config/external/ffi/preprocess_libffi_asm.py
vendored
2
config/external/ffi/preprocess_libffi_asm.py
vendored
@ -4,6 +4,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distibuted with this
|
||||
# file, You can obtain one at http://mozilla.og/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
import buildconfig
|
||||
import mozpack.path as mozpath
|
||||
import os
|
||||
|
1
config/external/ffi/subst_header.py
vendored
1
config/external/ffi/subst_header.py
vendored
@ -4,6 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distibuted with this
|
||||
# file, You can obtain one at http://mozilla.og/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import sys
|
||||
import buildconfig
|
||||
from mozbuild.preprocessor import Preprocessor
|
||||
|
2
config/external/icu/data/genicudata.py
vendored
2
config/external/icu/data/genicudata.py
vendored
@ -4,6 +4,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
|
||||
def main(output, data_file, data_symbol):
|
||||
output.write(''' AREA |.rdata|,ALIGN=4,DATA,READONLY
|
||||
|
@ -1,6 +1,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import string
|
||||
|
@ -1,6 +1,7 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
import os
|
||||
from mozbuild.util import FileAvoidWrite
|
||||
|
@ -2,6 +2,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import re
|
||||
import textwrap
|
||||
import string
|
||||
|
@ -164,6 +164,7 @@ class MockedOpen(object):
|
||||
f.write('foo')
|
||||
self.assertRaises(Exception,f.open('foo', 'r'))
|
||||
'''
|
||||
|
||||
def __init__(self, files={}):
|
||||
self.files = {}
|
||||
for name, content in files.items():
|
||||
|
@ -9,6 +9,7 @@
|
||||
# a full build environment set up.
|
||||
# The basic limitation is, it doesn't even try to link and ignores
|
||||
# all related options.
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
from optparse import OptionParser
|
||||
import mozfile
|
||||
|
@ -2,6 +2,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
import configobj
|
||||
import sys
|
||||
import re
|
||||
|
@ -9,6 +9,7 @@
|
||||
# 2.1a3pre > ""
|
||||
# 3.2b4 > " 3.2 Beta 4"
|
||||
# 3.2b4pre > ""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
|
@ -2,6 +2,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
"""
|
||||
Run a python script, adding extra directories to the python path.
|
||||
"""
|
||||
|
@ -2,6 +2,8 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import errno
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import buildconfig
|
||||
import subprocess
|
||||
import sys
|
||||
|
@ -1,3 +1,4 @@
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os
|
||||
|
@ -2,6 +2,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
from mozunit import main, MockedOpen
|
||||
import unittest
|
||||
|
@ -1,3 +1,4 @@
|
||||
from __future__ import absolute_import
|
||||
import unittest
|
||||
|
||||
import os
|
||||
|
@ -1,3 +1,4 @@
|
||||
from __future__ import absolute_import
|
||||
import unittest
|
||||
|
||||
import mozunit
|
||||
|
@ -2,6 +2,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
from __future__ import absolute_import
|
||||
import unittest
|
||||
|
||||
import shutil
|
||||
|
@ -5,7 +5,6 @@ py2:
|
||||
exclude:
|
||||
- build
|
||||
- client.py
|
||||
- config
|
||||
- dom
|
||||
- editor
|
||||
- gfx
|
||||
|
@ -6,7 +6,6 @@ py3:
|
||||
- browser/app
|
||||
- build
|
||||
- client.py
|
||||
- config
|
||||
- dom/bindings
|
||||
- dom/media/test
|
||||
- gfx
|
||||
|
Loading…
x
Reference in New Issue
Block a user