Skip to content

Commit baa0899

Browse files
author
Justin Wood
committed
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
1 parent 7a37d64 commit baa0899

29 files changed

+33
-4
lines changed

config/MozZipFile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
56
import os
67
import time
78
import zipfile
@@ -47,7 +48,7 @@ def writestr(self, zinfo_or_arcname, bytes):
4748
date_time=time.localtime(time.time()))
4849
zinfo.compress_type = self.compression
4950
# Add some standard UNIX file access permissions (-rw-r--r--).
50-
zinfo.external_attr = (0x81a4 & 0xFFFF) << 16L
51+
zinfo.external_attr = (0x81a4 & 0xFFFF) << 16
5152
else:
5253
zinfo = zinfo_or_arcname
5354

config/check_js_msg_encoding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# JSErrorFormatString.format member should be in ASCII encoding.
1010
# ----------------------------------------------------------------------------
1111

12+
from __future__ import absolute_import
1213
from __future__ import print_function
1314

1415
import os

config/check_js_opcode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# This script checks bytecode documentation in js/src/vm/Opcodes.h
88
# ----------------------------------------------------------------------------
99

10+
from __future__ import absolute_import
1011
from __future__ import print_function
1112

1213
import os

config/check_macroassembler_style.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# proper methods annotations.
2121
# ----------------------------------------------------------------------------
2222

23+
from __future__ import absolute_import
2324
from __future__ import print_function
2425

2526
import difflib

config/check_source_count.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# not, an error message is printed, quoting ERROR_LOCATION, which should
1010
# probably be the filename and line number of the erroneous call to
1111
# check_source_count.py.
12+
from __future__ import absolute_import
1213
from __future__ import print_function
1314
import sys
1415
import re

config/check_spidermonkey_style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# isolation, but don't try to do any order checking between such blocks.
3636
# ----------------------------------------------------------------------------
3737

38-
from __future__ import print_function
38+
from __future__ import absolute_import, print_function
3939

4040
import difflib
4141
import os

config/check_vanilla_allocations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
# mismatched alloc/free checking.
3737
# ----------------------------------------------------------------------------
3838

39+
from __future__ import absolute_import
3940
from __future__ import print_function
4041

4142
import argparse

config/createprecomplete.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# longer present in a complete update. The current working directory is used for
77
# the location to enumerate and to create the precomplete file.
88

9+
from __future__ import absolute_import
910
from __future__ import unicode_literals
1011

1112
import os

config/external/ffi/preprocess_libffi_asm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# License, v. 2.0. If a copy of the MPL was not distibuted with this
55
# file, You can obtain one at http://mozilla.og/MPL/2.0/.
66

7+
from __future__ import absolute_import
8+
from __future__ import print_function
79
import buildconfig
810
import mozpack.path as mozpath
911
import os

config/external/ffi/subst_header.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# License, v. 2.0. If a copy of the MPL was not distibuted with this
55
# file, You can obtain one at http://mozilla.og/MPL/2.0/.
66

7+
from __future__ import absolute_import
78
import sys
89
import buildconfig
910
from mozbuild.preprocessor import Preprocessor

config/external/icu/data/genicudata.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7+
from __future__ import absolute_import
8+
79

810
def main(output, data_file, data_symbol):
911
output.write(''' AREA |.rdata|,ALIGN=4,DATA,READONLY

config/make-stl-wrappers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This Source Code Form is subject to the terms of the Mozilla Public
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
from __future__ import absolute_import
45
from __future__ import print_function
56
import os
67
import string

config/make-system-wrappers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# This Source Code Form is subject to the terms of the Mozilla Public
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
from __future__ import absolute_import
45
from __future__ import print_function
56
import os
67
from mozbuild.util import FileAvoidWrite

config/make-windows-h-wrapper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
56
import re
67
import textwrap
78
import string

config/mozunit/mozunit/mozunit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ class MockedOpen(object):
164164
f.write('foo')
165165
self.assertRaises(Exception,f.open('foo', 'r'))
166166
'''
167+
167168
def __init__(self, files={}):
168169
self.files = {}
169170
for name, content in files.items():

config/nsinstall.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# a full build environment set up.
1010
# The basic limitation is, it doesn't even try to link and ignores
1111
# all related options.
12+
from __future__ import absolute_import
1213
from __future__ import print_function
1314
from optparse import OptionParser
1415
import mozfile

config/printconfigsetting.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
6+
from __future__ import print_function
57
import configobj
68
import sys
79
import re

config/printprereleasesuffix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# 2.1a3pre > ""
1010
# 3.2b4 > " 3.2 Beta 4"
1111
# 3.2b4pre > ""
12+
from __future__ import absolute_import
1213
from __future__ import print_function
1314

1415
import sys

config/pythonpath.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
6+
from __future__ import print_function
57
"""
68
Run a python script, adding extra directories to the python path.
79
"""

config/rebuild_check.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
6+
from __future__ import print_function
57
import os
68
import errno
79

config/run_spidermonkey_checks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
56
import buildconfig
67
import subprocess
78
import sys

config/system_header_util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import absolute_import
12
import os
23

34

config/tests/test_mozbuild_reading.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
56
from __future__ import unicode_literals
67

78
import os

config/tests/unit-mozunit.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
56
import os
67
from mozunit import main, MockedOpen
78
import unittest

config/tests/unit-nsinstall.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import absolute_import
12
import unittest
23

34
import os

config/tests/unit-printprereleasesuffix.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import absolute_import
12
import unittest
23

34
import mozunit

config/tests/unitMozZipFile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
from __future__ import absolute_import
56
import unittest
67

78
import shutil

tools/lint/py2.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ py2:
55
exclude:
66
- build
77
- client.py
8-
- config
98
- dom
109
- editor
1110
- gfx

tools/lint/py3.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ py3:
66
- browser/app
77
- build
88
- client.py
9-
- config
109
- dom/bindings
1110
- dom/media/test
1211
- gfx

0 commit comments

Comments
 (0)