Bug 1790816 - Reformat build/ with isort. r=linter-reviewers,ahal DONTBUILD

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162668
This commit is contained in:
Marco Castelluccio 2022-11-24 17:23:47 +00:00
parent d5ba50dc9f
commit ecb54845b0
23 changed files with 63 additions and 67 deletions

View File

@ -3,12 +3,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import print_function
import os
import subprocess
import buildconfig
import mozpack.path as mozpath
import os
import six
import subprocess
import pytoml
import six
# Try to read the package name or otherwise assume same name as the crate path.

View File

@ -6,21 +6,20 @@
# Only necessary for flake8 to be happy...
from __future__ import print_function
import os
import os.path
import shutil
import subprocess
import platform
import json
import argparse
import errno
import fnmatch
import glob
import errno
import json
import os
import os.path
import platform
import re
import shutil
import subprocess
import sys
import tarfile
from contextlib import contextmanager
from shutil import which
import zstandard

View File

@ -3,8 +3,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sys
from mozbuild.base import MozbuildObject
from mozbuild.backend.configenvironment import PartialConfigEnvironment
from mozbuild.base import MozbuildObject
config = MozbuildObject.from_environment()
partial_config = PartialConfigEnvironment(config.topobjdir)

View File

@ -27,7 +27,6 @@
import os
import sys
SANITIZERS = {
"asan": "address",
"hwasan": "hwaddress",

View File

@ -5,10 +5,10 @@
from __future__ import with_statement
from optparse import OptionParser
import hashlib
import logging
import os
from optparse import OptionParser
logger = logging.getLogger("checksums.py")

View File

@ -4,7 +4,6 @@
import json
import os
import posixpath
from os import PathLike
# `typing.Literal` not available until Python 3.8;

View File

@ -3,10 +3,10 @@
# 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/.
import os
import glob
import shutil
import errno
import glob
import os
import shutil
import ThirdPartyPaths
import ThreadAllows

View File

@ -7,9 +7,9 @@
from __future__ import unicode_literals
import difflib
import logging
import os
import difflib
import unittest
import buildconfig

View File

@ -5,6 +5,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sys
from mozbuild.preprocessor import Preprocessor

View File

@ -5,7 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
from argparse import ArgumentParser
ALL_HARNESSES = [

View File

@ -20,10 +20,8 @@ if sys.version_info[0] < 3:
else:
from importlib.abc import MetaPathFinder
from types import ModuleType
STATE_DIR_FIRST_RUN = """
Mach and the build system store shared state in a common directory
on the filesystem. The following directory will be created:
@ -145,7 +143,7 @@ def initialize(topsrcdir):
)
]
from mach.util import setenv, get_state_dir
from mach.util import get_state_dir, setenv
state_dir = _create_state_dir()
@ -157,7 +155,6 @@ def initialize(topsrcdir):
import mach.base
import mach.main
from mach.main import MachCommandReference
# Centralized registry of available mach commands

View File

@ -2,12 +2,13 @@
# 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/.
import buildconfig
import os
import shutil
import subprocess
import os
import sys
import buildconfig
def relativize(path, base=None):
# For absolute path in Unix builds, we need relative paths because

View File

@ -7,18 +7,18 @@
# certificates used for SSL testing in Mochitest. The already generated
# certs are located at $topsrcdir/build/pgo/certs/ .
import mozinfo
import os
import random
import re
import shutil
import subprocess
import sys
from distutils.spawn import find_executable
from mozbuild.base import MozbuildObject, BinaryNotFoundException
import mozinfo
from mozbuild.base import BinaryNotFoundException, MozbuildObject
from mozfile import NamedTemporaryFile, TemporaryDirectory
from mozprofile.permissions import ServerLocations
from distutils.spawn import find_executable
dbFiles = [
re.compile("^cert[0-9]+\.db$"),

View File

@ -4,19 +4,19 @@
# 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/.
import glob
import json
import os
import sys
import glob
import subprocess
import sys
import mozcrash
from mozbuild.base import MozbuildObject, BinaryNotFoundException
from mozbuild.base import BinaryNotFoundException, MozbuildObject
from mozfile import TemporaryDirectory
from mozhttpd import MozHttpd
from mozprofile import FirefoxProfile, Preferences
from mozprofile.permissions import ServerLocations
from mozrunner import FirefoxRunner, CLI
from mozrunner import CLI, FirefoxRunner
from six import string_types
PORT = 8888

View File

@ -2,9 +2,10 @@
# 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/.
import buildconfig
import textwrap
import string
import textwrap
import buildconfig
def generate_bool(name):

View File

@ -2,13 +2,14 @@
# 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 argparse import ArgumentParser
import os
from pathlib import Path
import re
import shutil
import subprocess
import sys
from argparse import ArgumentParser
from pathlib import Path
from buildconfig import substs
"""

View File

@ -15,9 +15,9 @@
# to indicate that files should be uploaded including their paths relative
# to the base path.
import sys
import os
import shutil
import sys
from optparse import OptionParser

View File

@ -6,22 +6,23 @@
from __future__ import absolute_import, print_function, unicode_literals
import argparse
from contextlib import contextmanager
import gzip
import io
import logging
import os
import sys
import tarfile
import time
from contextlib import contextmanager
from threading import Event, Thread
import requests
from mozbuild.generated_sources import (
get_filename_with_digest,
get_s3_region_and_bucket,
)
import os
from six.moves.queue import Queue
import requests
import sys
import tarfile
from requests.packages.urllib3.util.retry import Retry
from threading import Event, Thread
import time
from six.moves.queue import Queue
# Arbitrary, should probably measure this.
NUM_WORKER_THREADS = 10

View File

@ -6,18 +6,13 @@ from __future__ import absolute_import, unicode_literals
import json
import logging
import mozinfo
import os
import time
from mach.decorators import (
Command,
CommandArgument,
)
from mozbuild.base import (
MachCommandConditions as conditions,
BinaryNotFoundException,
)
import mozinfo
from mach.decorators import Command, CommandArgument
from mozbuild.base import BinaryNotFoundException
from mozbuild.base import MachCommandConditions as conditions
def is_valgrind_build(cls):

View File

@ -3,17 +3,17 @@
# 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/.
import sys
import yaml
from vsdownload import (
getArgsParser,
getManifest,
getPackages,
getSelectedPackages,
setPackageSelection,
lowercaseIgnores,
setPackageSelection,
)
import sys
import yaml
if __name__ == "__main__":
parser = getArgsParser()

View File

@ -3,17 +3,15 @@
# 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 vsdownload import (
downloadPackages,
extractPackages,
)
from pathlib import Path
from tempfile import TemporaryDirectory
from zstandard import ZstdCompressor
import argparse
import os
import tarfile
from pathlib import Path
from tempfile import TemporaryDirectory
import yaml
from vsdownload import downloadPackages, extractPackages
from zstandard import ZstdCompressor
def tzstd_path(path):

View File

@ -7,11 +7,12 @@
# run the Winchecksec tool (https://github.com/trailofbits/winchecksec)
# against a given Windows binary.
import buildconfig
import json
import subprocess
import sys
import buildconfig
# usage
if len(sys.argv) != 2:
print("""usage : autowinchecksec.by path_to_binary""")

View File

@ -4,6 +4,7 @@
import os
import subprocess
from buildconfig import substs