diff --git a/SConstruct b/SConstruct index 5729c029cdd..4403e171d80 100644 --- a/SConstruct +++ b/SConstruct @@ -5,7 +5,6 @@ EnsureSConsVersion(0, 98, 1) # System import glob import os -import string import sys # Local diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 40dde48432d..c7639a2ce90 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -1,11 +1,10 @@ #!/usr/bin/env python3 import argparse -import sys import os import re import xml.etree.ElementTree as ET -from collections import defaultdict, OrderedDict +from collections import OrderedDict # Uncomment to do type checks. I have it commented out so it works below Python 3.5 #from typing import List, Dict, TextIO, Tuple, Iterable, Optional, DefaultDict, Any, Union diff --git a/editor/editor_builders.py b/editor/editor_builders.py index 9e9fe752b49..19c5e0b924b 100644 --- a/editor/editor_builders.py +++ b/editor/editor_builders.py @@ -6,7 +6,7 @@ All such functions are invoked in a subprocess on Windows to prevent build flaki import os import os.path from platform_methods import subprocess_main -from compat import encode_utf8, byte_to_str, open_utf8, escape_string +from compat import encode_utf8, byte_to_str, open_utf8 def make_doc_header(target, source, env): diff --git a/methods.py b/methods.py index 5bc30dc643b..ec9ecdb17fb 100644 --- a/methods.py +++ b/methods.py @@ -4,7 +4,6 @@ import sys import re import glob import string -import datetime import subprocess from compat import iteritems, isbasestring, decode_utf8 diff --git a/modules/mono/SCsub b/modules/mono/SCsub index 706949154e0..b6ba9b1c233 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -257,7 +257,6 @@ def find_msbuild_windows(): def mono_build_solution(source, target, env): import subprocess - import mono_reg_utils as monoreg from shutil import copyfile sln_path = os.path.abspath(str(source[0])) diff --git a/modules/mono/config.py b/modules/mono/config.py index a81ecfce704..6b88600c565 100644 --- a/modules/mono/config.py +++ b/modules/mono/config.py @@ -5,7 +5,7 @@ import sys import subprocess from distutils.version import LooseVersion -from SCons.Script import BoolVariable, Dir, Environment, File, SCons, Variables +from SCons.Script import BoolVariable, Dir, Environment, Variables monoreg = imp.load_source('mono_reg_utils', 'modules/mono/mono_reg_utils.py') diff --git a/platform/android/SCsub b/platform/android/SCsub index 47d5035224d..eb39928613f 100644 --- a/platform/android/SCsub +++ b/platform/android/SCsub @@ -2,7 +2,6 @@ Import('env') -import shutil from compat import open_utf8 from distutils.version import LooseVersion from detect import get_ndk_version diff --git a/platform/android/detect.py b/platform/android/detect.py index 80cda68a9e8..56232740500 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -1,6 +1,5 @@ import os import sys -import string import platform from distutils.version import LooseVersion diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub index 41991bce865..fa1b124561e 100644 --- a/platform/iphone/SCsub +++ b/platform/iphone/SCsub @@ -2,8 +2,6 @@ Import('env') -import os - iphone_lib = [ 'godot_iphone.cpp', 'os_iphone.cpp', diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 172572bcb45..853f24379eb 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -1,5 +1,4 @@ import os -import string import sys from methods import detect_darwin_sdk_path diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 47da8de5df6..c7acbde3f7d 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -1,5 +1,4 @@ import os -import sys def is_active(): diff --git a/platform/osx/SCsub b/platform/osx/SCsub index d2952ebdc04..e15b4339a79 100644 --- a/platform/osx/SCsub +++ b/platform/osx/SCsub @@ -2,7 +2,6 @@ Import('env') -import os from platform_methods import run_in_subprocess import platform_osx_builders diff --git a/platform/server/SCsub b/platform/server/SCsub index 62d45efbc07..f977275595b 100644 --- a/platform/server/SCsub +++ b/platform/server/SCsub @@ -1,7 +1,5 @@ #!/usr/bin/env python -import os -import platform import sys Import('env') diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py index c32a11b3961..f8f1b066f6d 100644 --- a/platform/uwp/detect.py +++ b/platform/uwp/detect.py @@ -1,6 +1,5 @@ import methods import os -import string import sys @@ -25,8 +24,6 @@ def can_build(): def get_opts(): - from SCons.Variables import BoolVariable - return [ ('msvc_version', 'MSVC version to use (ignored if the VCINSTALLDIR environment variable is set)', None), ] diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 426a5e9e614..0118b5bae20 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -1,6 +1,5 @@ import methods import os -import sys def is_active(): diff --git a/platform/x11/SCsub b/platform/x11/SCsub index e302f09c888..3d5aa152088 100644 --- a/platform/x11/SCsub +++ b/platform/x11/SCsub @@ -2,7 +2,6 @@ Import('env') -import os from platform_methods import run_in_subprocess import platform_x11_builders diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 5cc5ef4ac0b..5f7b825f5ea 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -1,9 +1,9 @@ import os import platform import sys -from compat import decode_utf8 from methods import get_compiler_version, using_gcc + def is_active(): return True diff --git a/scene/resources/default_theme/make_header.py b/scene/resources/default_theme/make_header.py index 73b1ae0b0b2..bd5a723b23a 100755 --- a/scene/resources/default_theme/make_header.py +++ b/scene/resources/default_theme/make_header.py @@ -1,8 +1,6 @@ #!/usr/bin/env python -import os import glob -import string enc = "utf-8"