Skip to content

Commit 369554b

Browse files
committed
Revert "[Python] Use explicit imports"
1 parent d48fa73 commit 369554b

File tree

7 files changed

+13
-50
lines changed

7 files changed

+13
-50
lines changed

tools/SourceKit/bindings/python/sourcekitd/capi.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,7 @@
1010
#
1111
#===------------------------------------------------------------------------===#
1212

13-
from ctypes import (
14-
CFUNCTYPE,
15-
POINTER,
16-
Structure,
17-
addressof,
18-
c_bool,
19-
c_char_p,
20-
c_int,
21-
c_int64,
22-
c_size_t,
23-
c_uint64,
24-
c_void_p,
25-
cdll,
26-
py_object,
27-
string_at,
28-
)
13+
from ctypes import *
2914

3015
# ctypes doesn't implicitly convert c_void_p to the appropriate wrapper
3116
# object. This is a problem, because it means that from_parameter will see an

utils/build-script

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,8 @@ import textwrap
2121

2222
sys.path.append(os.path.dirname(__file__))
2323

24-
from SwiftBuildSupport import (
25-
HOME,
26-
SWIFT_BUILD_ROOT,
27-
SWIFT_SOURCE_ROOT,
28-
check_call,
29-
get_all_preset_names,
30-
get_preset_options,
31-
print_with_argv0,
32-
quote_shell_command,
33-
)
24+
from SwiftBuildSupport import *
25+
3426

3527
# Main entry point for the preset mode.
3628
def main_preset():

utils/cmpcodesize/cmpcodesize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
from cmpcodesize.main import main
3+
import cmpcodesize
44

55
if __name__ == '__main__':
6-
main()
6+
cmpcodesize.main()

utils/cmpcodesize/cmpcodesize/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from __future__ import absolute_import
2+
from .main import main
3+
14
__author__ = 'Brian Gesiak'
25
__email__ = '[email protected]'
36
__versioninfo__ = (0, 1, 0)

utils/pygments/swift.py

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,8 @@
22

33
import re
44

5-
from pygments.lexer import (
6-
Comment,
7-
Generic,
8-
Keyword,
9-
Name,
10-
Number,
11-
Operator,
12-
Punctuation,
13-
RegexLexer,
14-
String,
15-
Text,
16-
Whitespace,
17-
bygroups,
18-
include,
19-
)
5+
from pygments.lexer import RegexLexer, include, bygroups
6+
from pygments.token import *
207

218
__all__ = ['SwiftLexer', 'SwiftConsoleLexer']
229

utils/recursive-lipo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import filecmp
88
import os
99
import shutil
1010

11-
from SwiftBuildSupport import check_call
11+
from SwiftBuildSupport import *
1212

1313
def merge_file_lists(src_root_dirs, skip_files, skip_subpaths):
1414
"""Merges the file lists recursively from all src_root_dirs supplied,

utils/update-checkout

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ import sys
1919

2020
sys.path.append(os.path.dirname(__file__))
2121

22-
from SwiftBuildSupport import (
23-
SWIFT_SOURCE_ROOT,
24-
WorkingDirectory,
25-
check_call,
26-
check_output,
27-
)
22+
from SwiftBuildSupport import *
23+
2824

2925
def update_git_svn(repo_path):
3026
with WorkingDirectory(repo_path):

0 commit comments

Comments
 (0)