Bug 1397318: mozlint -l py2 for taskcluster/; r?ahal
MozReview-Commit-ID: 1ZUOrIfxQef
--- a/taskcluster/docker/funsize-balrog-submitter/scripts/funsize-balrog-submitter.py
+++ b/taskcluster/docker/funsize-balrog-submitter/scripts/funsize-balrog-submitter.py
@@ -1,9 +1,11 @@
#!/usr/bin/env python
+from __future__ import absolute_import, print_function
+
import site
import os
import logging
import argparse
import json
import hashlib
import requests
import tempfile
--- a/taskcluster/docker/funsize-update-generator/scripts/funsize.py
+++ b/taskcluster/docker/funsize-update-generator/scripts/funsize.py
@@ -1,9 +1,10 @@
#!/usr/bin/env python
+from __future__ import absolute_import, print_function
import ConfigParser
import argparse
import functools
import hashlib
import json
import logging
import os
--- a/taskcluster/docker/rust-build/repack_rust.py
+++ b/taskcluster/docker/rust-build/repack_rust.py
@@ -1,15 +1,17 @@
#!/bin/env python
'''
This script downloads and repacks official rust language builds
with the necessary tool and target support for the Firefox
build environment.
'''
+from __future__ import absolute_import, print_function
+
import argparse
import os.path
import sys
import requests
import subprocess
import toml
--- a/taskcluster/docker/rust-build/splat_rust.py
+++ b/taskcluster/docker/rust-build/splat_rust.py
@@ -1,13 +1,14 @@
#!/bin/env python
'''
This script patches tooltool manifests in the firefox source
tree to update them to a new set of rust packages.
'''
+from __future__ import absolute_import, print_function
import json
import os.path
import sys
from collections import OrderedDict
--- a/taskcluster/docker/rust-build/tcbuild.py
+++ b/taskcluster/docker/rust-build/tcbuild.py
@@ -1,16 +1,16 @@
#!/bin/env python
'''
This script triggers a taskcluster task, waits for it to finish,
fetches the artifacts, uploads them to tooltool, and updates
the in-tree tooltool manifests.
'''
-from __future__ import print_function
+from __future__ import absolute_import, print_function
import requests.packages.urllib3
import argparse
import datetime
import json
import os
import shutil
--- a/taskcluster/taskgraph/__init__.py
+++ b/taskcluster/taskgraph/__init__.py
@@ -1,7 +1,9 @@
# 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, print_function, unicode_literals
+
import os
GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
--- a/taskcluster/taskgraph/test/test_util_attributes.py
+++ b/taskcluster/taskgraph/test/test_util_attributes.py
@@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
# 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, print_function, unicode_literals
+
import unittest
from taskgraph.util.attributes import (
attrmatch,
match_run_on_projects,
)
from mozunit import main
--- a/taskcluster/taskgraph/test/test_util_time.py
+++ b/taskcluster/taskgraph/test/test_util_time.py
@@ -1,14 +1,16 @@
# -*- coding: utf-8 -*-
# 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, print_function, unicode_literals
+
import unittest
import mozunit
from datetime import datetime
from taskgraph.util.time import (
InvalidString,
UnknownTimeMeasurement,
value_of,
json_time_from_now
--- a/taskcluster/taskgraph/util/attributes.py
+++ b/taskcluster/taskgraph/util/attributes.py
@@ -1,12 +1,14 @@
# 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, print_function, unicode_literals
+
import re
INTEGRATION_PROJECTS = {
'mozilla-inbound',
'autoland',
}
--- a/taskcluster/taskgraph/util/push_apk.py
+++ b/taskcluster/taskgraph/util/push_apk.py
@@ -1,14 +1,15 @@
# 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/.
"""
Common functions for both push-apk and push-apk-breakpoint.
"""
+from __future__ import absolute_import, print_function, unicode_literals
import re
from taskgraph.util.schema import validate_schema
REQUIRED_ARCHITECTURES = {
'android-x86-nightly',
'android-api-16-nightly',
--- a/taskcluster/taskgraph/util/seta.py
+++ b/taskcluster/taskgraph/util/seta.py
@@ -1,8 +1,14 @@
+# 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, print_function, unicode_literals
+
import json
import logging
import requests
from collections import defaultdict
from redo import retry
from requests import exceptions
logger = logging.getLogger(__name__)
--- a/taskcluster/taskgraph/util/signed_artifacts.py
+++ b/taskcluster/taskgraph/util/signed_artifacts.py
@@ -1,15 +1,17 @@
# 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/.
"""
Defines artifacts to sign before repackage.
"""
+from __future__ import absolute_import, print_function, unicode_literals
+
def generate_specifications_of_artifacts_to_sign(
build_platform, is_nightly=False, keep_locale_template=True
):
if 'android' in build_platform:
artifacts_specifications = [{
'artifacts': [
'public/build/{locale}/target.apk',
--- a/taskcluster/taskgraph/util/time.py
+++ b/taskcluster/taskgraph/util/time.py
@@ -1,15 +1,17 @@
# 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/.
# Python port of the ms.js node module this is not a direct port some things are
# more complicated or less precise and we lean on time delta here.
+from __future__ import absolute_import, print_function, unicode_literals
+
import re
import datetime
PATTERN = re.compile(
'((?:\d+)?\.?\d+) *([a-z]+)'
)
--- a/taskcluster/taskgraph/util/verify.py
+++ b/taskcluster/taskgraph/util/verify.py
@@ -1,13 +1,15 @@
# -*- coding: utf-8 -*-
# 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, print_function, unicode_literals
+
import re
import os
import sys
base_path = os.path.join(os.getcwd(), "taskcluster/docs/")
class VerificationSequence(object):
--- a/tools/lint/py2.yml
+++ b/tools/lint/py2.yml
@@ -32,18 +32,16 @@ py2:
- python/mach
- python/mozboot
- python/mozbuild
- python/mozlint
- python/mozversioncontrol
- security
- services/common/tests/mach_commands.py
- servo
- - taskcluster/docker
- - taskcluster/taskgraph
- testing/awsy
- testing/firefox-ui
- testing/geckodriver
- testing/gtest
- testing/instrumentation/runinstrumentation.py
- testing/marionette
- testing/mochitest
- testing/mozbase