chore: remove unused imports in our python scripts (#25406)

Seen at https://lgtm.com/projects/g/electron/electron/?mode=list&id=py%2Funused-import
and confirmed with manual inspection.
This commit is contained in:
Charles Kerr 2020-09-13 20:25:49 -05:00 committed by GitHub
parent 70e3aa0182
commit 9b08fbefe5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 5 additions and 27 deletions

View file

@ -11,7 +11,6 @@ import find_depot_tools
from vs_toolchain import \ from vs_toolchain import \
SetEnvironmentAndGetRuntimeDllDirs, \ SetEnvironmentAndGetRuntimeDllDirs, \
SetEnvironmentAndGetSDKDir, \ SetEnvironmentAndGetSDKDir, \
GetVisualStudioVersion, \
NormalizePath NormalizePath
sys.path.append("%s/win_toolchain" % find_depot_tools.add_depot_tools_to_path()) sys.path.append("%s/win_toolchain" % find_depot_tools.add_depot_tools_to_path())

View file

@ -1,6 +1,5 @@
import sys import sys
import os import os
import subprocess
def main(argv): def main(argv):
cwd = argv[1] cwd = argv[1]

View file

@ -3,7 +3,6 @@
import argparse import argparse
import json import json
import os import os
import sys
from lib import git from lib import git
from lib.patches import patch_from_dir from lib.patches import patch_from_dir

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
import atexit
import os import os
import subprocess import subprocess
import sys import sys

View file

@ -2,8 +2,6 @@
import argparse import argparse
import json import json
import os
import sys
from lib import git from lib import git

View file

@ -1,9 +1,6 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
import argparse import argparse
import os
import re
import subprocess
import sys import sys
from lib import git from lib import git

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
import argparse import argparse
import os
import sys import sys
from lib import git from lib import git

View file

@ -1,9 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
from __future__ import print_function from __future__ import print_function
import errno
import os import os
import platform
import sys import sys
# URL to the mips64el sysroot image. # URL to the mips64el sysroot image.

View file

@ -3,12 +3,9 @@
from __future__ import print_function from __future__ import print_function
import atexit import atexit
import contextlib import contextlib
import datetime
import errno import errno
import json import json
import os import os
import platform
import re
import shutil import shutil
import ssl import ssl
import stat import stat
@ -23,8 +20,7 @@ except ImportError:
from urllib2 import urlopen from urllib2 import urlopen
import zipfile import zipfile
from lib.config import is_verbose_mode, PLATFORM from lib.config import is_verbose_mode
from lib.env_util import get_vs_env
ELECTRON_DIR = os.path.abspath( ELECTRON_DIR = os.path.abspath(
os.path.dirname(os.path.dirname(os.path.dirname(__file__))) os.path.dirname(os.path.dirname(os.path.dirname(__file__)))

View file

@ -14,8 +14,8 @@ def is_fs_case_sensitive():
sys.path.append( sys.path.append(
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../.."))
from lib.config import PLATFORM, s3_config, enable_verbose_mode from lib.config import PLATFORM, s3_config
from lib.util import get_electron_branding, execute, rm_rf, safe_mkdir, s3put, \ from lib.util import get_electron_branding, execute, s3put, \
get_out_dir, ELECTRON_DIR get_out_dir, ELECTRON_DIR
RELEASE_DIR = get_out_dir() RELEASE_DIR = get_out_dir()

View file

@ -3,7 +3,6 @@
from __future__ import print_function from __future__ import print_function
import argparse import argparse
import datetime import datetime
import errno
import hashlib import hashlib
import json import json
import mmap import mmap
@ -12,18 +11,16 @@ import shutil
import subprocess import subprocess
from struct import Struct from struct import Struct
import sys import sys
import tempfile
sys.path.append( sys.path.append(
os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../..")) os.path.abspath(os.path.dirname(os.path.abspath(__file__)) + "/../.."))
from io import StringIO
from zipfile import ZipFile from zipfile import ZipFile
from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \ from lib.config import PLATFORM, get_target_arch, get_env_var, s3_config, \
get_zip_name get_zip_name
from lib.util import get_electron_branding, execute, get_electron_version, \ from lib.util import get_electron_branding, execute, get_electron_version, \
scoped_cwd, s3put, get_electron_exec, \ s3put, get_electron_exec, get_out_dir, \
get_out_dir, SRC_DIR, ELECTRON_DIR SRC_DIR, ELECTRON_DIR
ELECTRON_REPO = 'electron/electron' ELECTRON_REPO = 'electron/electron'

View file

@ -5,10 +5,8 @@ from __future__ import print_function
import argparse import argparse
import os import os
import re import re
import shlex
import subprocess import subprocess
import sys import sys
import time
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))

View file

@ -7,7 +7,6 @@ import shutil
import subprocess import subprocess
import sys import sys
from lib.config import get_target_arch
from lib.util import get_electron_branding, rm_rf, scoped_cwd from lib.util import get_electron_branding, rm_rf, scoped_cwd
PROJECT_NAME = get_electron_branding()['project_name'] PROJECT_NAME = get_electron_branding()['project_name']