Browse Source

Remove unused imports

Hendrikto 6 years ago
parent
commit
49a81308c0

+ 0 - 1
SConstruct

@@ -5,7 +5,6 @@ EnsureSConsVersion(0, 98, 1)
 # System
 import glob
 import os
-import string
 import sys
 
 # Local

+ 1 - 2
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

+ 1 - 1
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):

+ 0 - 1
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
 

+ 0 - 1
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]))

+ 1 - 1
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')

+ 0 - 1
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

+ 0 - 1
platform/android/detect.py

@@ -1,6 +1,5 @@
 import os
 import sys
-import string
 import platform
 from distutils.version import LooseVersion
 

+ 0 - 2
platform/iphone/SCsub

@@ -2,8 +2,6 @@
 
 Import('env')
 
-import os
-
 iphone_lib = [
     'godot_iphone.cpp',
     'os_iphone.cpp',

+ 0 - 1
platform/iphone/detect.py

@@ -1,5 +1,4 @@
 import os
-import string
 import sys
 from methods import detect_darwin_sdk_path
 

+ 0 - 1
platform/javascript/detect.py

@@ -1,5 +1,4 @@
 import os
-import sys
 
 
 def is_active():

+ 0 - 1
platform/osx/SCsub

@@ -2,7 +2,6 @@
 
 Import('env')
 
-import os
 from platform_methods import run_in_subprocess
 import platform_osx_builders
 

+ 0 - 2
platform/server/SCsub

@@ -1,7 +1,5 @@
 #!/usr/bin/env python
 
-import os
-import platform
 import sys
 
 Import('env')

+ 0 - 3
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),
     ]

+ 0 - 1
platform/windows/detect.py

@@ -1,6 +1,5 @@
 import methods
 import os
-import sys
 
 
 def is_active():

+ 0 - 1
platform/x11/SCsub

@@ -2,7 +2,6 @@
 
 Import('env')
 
-import os
 from platform_methods import run_in_subprocess
 import platform_x11_builders
 

+ 1 - 1
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
 

+ 0 - 2
scene/resources/default_theme/make_header.py

@@ -1,8 +1,6 @@
 #!/usr/bin/env python
 
-import os
 import glob
-import string
 
 enc = "utf-8"