Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D165395
This commit is contained in:
Marco Castelluccio
2022-12-23 22:45:46 +00:00
parent 48a015c02c
commit ba39d286d5
233 changed files with 1 additions and 459 deletions

View File

@@ -2,7 +2,6 @@
# 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
import json
import os
import shlex

View File

@@ -4,8 +4,6 @@
# 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

View File

@@ -4,8 +4,6 @@
# 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 buildconfig

View File

@@ -3,8 +3,6 @@
# 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 io
import re
import sys

View File

@@ -4,8 +4,6 @@
# 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 subprocess
import tempfile

View File

@@ -1,5 +1,3 @@
from __future__ import absolute_import, print_function
import os
import time

View File

@@ -3,8 +3,6 @@
# 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 textwrap
from marionette_harness.marionette_test import MarionetteTestCase

View File

@@ -2,8 +2,6 @@
# 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 urllib.parse import quote
from marionette_driver import Wait, errors

View File

@@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# add this directory to the path
from __future__ import absolute_import
import os
import sys

View File

@@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# add this directory to the path
from __future__ import absolute_import
import os
import sys

View File

@@ -3,8 +3,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# add this directory to the path
from __future__ import absolute_import
import os
import sys

View File

@@ -15,8 +15,6 @@ paths by default when using macOS's /usr/bin/python.
Includes generous amount of logging to aid debugging for use in automated tests.
"""
from __future__ import absolute_import, print_function
import argparse
import logging
import os

View File

@@ -2,8 +2,6 @@
# 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 test(mod, path, entity=None):
# ignore anything but Firefox

View File

@@ -5,8 +5,6 @@
# Generate updater.ini by doing some light substitution on the localized updater.ini input,
# and appending the contents of updater_ini_append on Windows.
from __future__ import absolute_import, print_function, unicode_literals
import codecs
import re
import shutil

View File

@@ -2,8 +2,6 @@
# 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 print_function
import os
import subprocess

View File

@@ -4,8 +4,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Only necessary for flake8 to be happy...
from __future__ import print_function
import argparse
import errno
import fnmatch

View File

@@ -3,8 +3,6 @@
# 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 with_statement
import hashlib
import logging
import os

View File

@@ -5,8 +5,6 @@
# originally from https://hg.mozilla.org/build/tools/file/4ab9c1a4e05b/scripts/release/compare-mozconfigs.py # NOQA: E501
from __future__ import unicode_literals
import difflib
import logging
import os

View File

@@ -2,8 +2,6 @@
# 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 division, print_function, unicode_literals
import math
import os
import shutil

View File

@@ -3,8 +3,6 @@
# 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 argparse
import gzip
import io

View File

@@ -2,8 +2,6 @@
# 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, unicode_literals
import json
import logging
import os

View File

@@ -2,8 +2,6 @@
# 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 print_function, unicode_literals
import logging
import re

View File

@@ -2,8 +2,6 @@
# 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 print_function, unicode_literals
import os
import subprocess
import sys

View File

@@ -3,8 +3,6 @@
# 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
HG_EXCLUSIONS = [".hg", ".hgignore", ".hgtags"]
import glob

View File

@@ -2,8 +2,6 @@
# 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
import time
import zipfile

View File

@@ -9,8 +9,6 @@
# JSErrorFormatString.format member should be in ASCII encoding.
# ----------------------------------------------------------------------------
from __future__ import absolute_import, print_function, unicode_literals
import os
import sys

View File

@@ -7,8 +7,6 @@
# This script checks bytecode documentation in js/src/vm/Opcodes.h
# ----------------------------------------------------------------------------
from __future__ import absolute_import, print_function
import os
import sys

View File

@@ -20,8 +20,6 @@
# proper methods annotations.
# ----------------------------------------------------------------------------
from __future__ import absolute_import, print_function
import difflib
import os
import re

View File

@@ -9,8 +9,6 @@
# 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, print_function
import re
import sys

View File

@@ -35,8 +35,6 @@
# isolation, but don't try to do any order checking between such blocks.
# ----------------------------------------------------------------------------
from __future__ import absolute_import, print_function
import difflib
import os
import re

View File

@@ -38,8 +38,6 @@
# mismatched alloc/free checking.
# ----------------------------------------------------------------------------
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import re
import subprocess

View File

@@ -6,8 +6,6 @@
# 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, unicode_literals
import io
import os

View File

@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distibuted with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function
import os
import shlex
import subprocess

View File

@@ -4,8 +4,6 @@
# License, v. 2.0. If a copy of the MPL was not distibuted with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
import sys
import buildconfig

View File

@@ -2,8 +2,6 @@
# 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 subprocess

View File

@@ -1,8 +1,6 @@
# 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
import os
import string

View File

@@ -1,8 +1,6 @@
# 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
import os
from mozbuild.util import FileAvoidWrite

View File

@@ -2,8 +2,6 @@
# 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 string
import textwrap

View File

@@ -3,6 +3,4 @@
# 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 .mozunit import *

View File

@@ -2,8 +2,6 @@
# 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 inspect
import io
import os

View File

@@ -2,8 +2,6 @@
# 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
import pytest

View File

@@ -2,8 +2,6 @@
# 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 setuptools import setup
setup(

View File

@@ -9,8 +9,6 @@
# 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, print_function
import os
import os.path
import shutil

View File

@@ -9,8 +9,6 @@
# 2.1a3pre > ""
# 3.2b4 > " 3.2 Beta 4"
# 3.2b4pre > ""
from __future__ import absolute_import, print_function
import re
import sys

View File

@@ -2,8 +2,6 @@
# 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 errno
import os

View File

@@ -6,8 +6,6 @@
# This script runs a process and prefixes its output with.
# Usage: run-and-prefix.py prefix command arg0 argv1...
from __future__ import absolute_import, print_function, unicode_literals
import os
import subprocess
import sys

View File

@@ -2,8 +2,6 @@
# 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 subprocess
import sys

View File

@@ -2,8 +2,6 @@
# 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, unicode_literals
import os
import sys
import unittest

View File

@@ -2,8 +2,6 @@
# 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 unittest
from tempfile import mkstemp

View File

@@ -1,5 +1,3 @@
from __future__ import absolute_import
import os
import os.path
import sys

View File

@@ -1,5 +1,3 @@
from __future__ import absolute_import
import unittest
import mozunit

View File

@@ -2,8 +2,6 @@
# 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 copy
import os
import random

View File

@@ -2,8 +2,6 @@
# 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 codecs
import errno
import io
@@ -250,7 +248,6 @@ def config_status(config, execute=True):
"""\
#!%(python)s
# coding=utf-8
from __future__ import unicode_literals
"""
)
% {"python": config["PYTHON3"]}

View File

@@ -1,5 +1,3 @@
from __future__ import absolute_import
from mod_pywebsocket import msgutil

View File

@@ -7,8 +7,6 @@
A fake ADB binary
"""
from __future__ import absolute_import
import os
import socketserver
import sys

View File

@@ -1,4 +1,3 @@
from __future__ import absolute_import
from mod_pywebsocket import msgutil

View File

@@ -8,7 +8,6 @@ script that uses InspectorUtils to query the CSS properties used by the browser.
This information is used to generate the properties-db.js file.
"""
from __future__ import absolute_import, print_function
import json
import logging
import os

View File

@@ -11,7 +11,6 @@ Run this script via
with a mozconfig that references a built non-artifact build.
"""
from __future__ import absolute_import, unicode_literals, print_function
from os import path, remove, system
import json
import WebIDL

View File

@@ -2,7 +2,6 @@
# 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 sys

View File

@@ -2,8 +2,6 @@
# 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, unicode_literals
import os
import sys

View File

@@ -4,8 +4,6 @@
# 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 print_function
import os
import sys

View File

@@ -2,8 +2,6 @@
# 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, unicode_literals
import os
import sys

View File

@@ -5,8 +5,6 @@
# This module contains code for managing WebIDL files and bindings for
# the build system.
from __future__ import print_function, unicode_literals
import errno
import hashlib
import io

View File

@@ -2,8 +2,6 @@
# 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 unicode_literals
import imp
import io
import json

View File

@@ -4,8 +4,6 @@
""" A WebIDL parser. """
from __future__ import print_function
import copy
import math
import os

View File

@@ -1,8 +1,6 @@
# 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 print_function
import os
import sys
import glob

View File

@@ -2,8 +2,6 @@
# 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 shutil

View File

@@ -1,8 +1,6 @@
# 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
import argparse
import codecs
import locale

View File

@@ -1,6 +1,5 @@
#!/usr/bin/env python
from __future__ import print_function
import locale
import subprocess
from collections import defaultdict

View File

@@ -2,8 +2,6 @@
# 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.path
import re
import sys

View File

@@ -10,8 +10,6 @@
# This script expects to be run from `update-icu.sh` after the in-tree
# copy of ICU has been updated.
from __future__ import absolute_import, print_function
import glob
import multiprocessing
import os

View File

@@ -2,8 +2,6 @@
# 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
import re
from collections import namedtuple
from unicodedata import category, combining, normalize

View File

@@ -1,8 +1,6 @@
# 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 print_function
import optparse
import os
import sys

View File

@@ -2,8 +2,6 @@
# 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 print_function
__all__ = [
"gencxx",
"genipdl",

View File

@@ -3,8 +3,6 @@
# 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 print_function
import sys
from ipdl.ast import Visitor, ASYNC

View File

@@ -3,8 +3,6 @@
# 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 print_function
import os
import sys

View File

@@ -3,8 +3,6 @@
# 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 print_function
import sys
msgid = int(sys.argv[1])

View File

@@ -2,8 +2,6 @@
# 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 print_function, unicode_literals
import string
import sys

View File

@@ -36,8 +36,6 @@
#
# It uses the C preprocessor to process its inputs.
from __future__ import with_statement
import errno
import os
import re

View File

@@ -41,8 +41,6 @@
simple digit mappings and verifies that it's in sync with ICU/CLDR.
"""
from __future__ import print_function
import io
import json
import os

View File

@@ -4,8 +4,6 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import print_function
import argparse
import re
from collections import defaultdict

View File

@@ -5,8 +5,6 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import json
import os

View File

@@ -3,8 +3,6 @@
# 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 print_function
import argparse
import os
import site

View File

@@ -13,8 +13,6 @@
// [stack] VAL1 VAL2 VAL3
"""
from __future__ import print_function
import re
import sys

View File

@@ -3,8 +3,6 @@
# 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 print_function, unicode_literals
import math
import os
import platform

View File

@@ -2,8 +2,6 @@
"""usage: %progname candidate_path baseline_path
"""
from __future__ import print_function
import json
import optparse
from operator import itemgetter

View File

@@ -9,8 +9,6 @@ The JS Shell Test Harness.
See the adjacent README.txt for more details.
"""
from __future__ import print_function
import math
import os
import platform

View File

@@ -6,8 +6,6 @@
# jit_test.py -- Python harness for JavaScript trace tests.
from __future__ import print_function
import os
import re
import sys

View File

@@ -2,8 +2,6 @@
#
# This includes classes for representing and parsing JS manifests.
from __future__ import print_function
import io
import os
import posixpath

View File

@@ -1,5 +1,3 @@
from __future__ import print_function
import json
import pipes
import re

View File

@@ -1,8 +1,6 @@
# produce mozlog-compatible log messages, following the spec at
# https://mozbase.readthedocs.io/en/latest/mozlog.html
from __future__ import print_function
import json
import os
from time import time

View File

@@ -1,8 +1,6 @@
# 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 division, print_function, unicode_literals
import os
import posixpath
import sys

View File

@@ -1,8 +1,6 @@
# 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 division, print_function, unicode_literals
import subprocess
import sys
from datetime import datetime, timedelta

View File

@@ -1,8 +1,6 @@
# 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
try:
# Python 3.2
from tempfile import TemporaryDirectory

View File

@@ -7,8 +7,6 @@
to js/src/tests/non262/String/normalize-generateddata-input.js
"""
from __future__ import print_function
import re
import sys

View File

@@ -21,8 +21,6 @@ Arguments:
dirpath directory filled with parsilicious js files
"""
from __future__ import print_function
import json
import math
import optparse

View File

@@ -5,8 +5,6 @@
# 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 print_function
import os
import re
import shutil

View File

@@ -5,8 +5,6 @@
# 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 print_function
import contextlib
import io
import os

View File

@@ -19,8 +19,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import print_function, unicode_literals
import csv
import io
import os

View File

@@ -3,8 +3,6 @@
# 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
import io
import os
import struct

Some files were not shown because too many files have changed in this diff Show More