Skip to content

Commit a8cabe6

Browse files
Use explicit imports.
1 parent f002192 commit a8cabe6

File tree

6 files changed

+35
-11
lines changed

6 files changed

+35
-11
lines changed

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

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

13-
from ctypes import *
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+
)
1429

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

utils/build-script

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

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

24-
from SwiftBuildSupport import *
25-
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+
)
2634

2735
# Main entry point for the preset mode.
2836
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-
import cmpcodesize
3+
from cmpcodesize.main import main
44

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

utils/cmpcodesize/cmpcodesize/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
from __future__ import absolute_import
2-
from .main import main
3-
41
__author__ = 'Brian Gesiak'
52
__email__ = 'modocache@gmail.com'
63
__versioninfo__ = (0, 1, 0)

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 *
11+
from SwiftBuildSupport import check_call
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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ import sys
1919

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

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

2529
def update_git_svn(repo_path):
2630
with WorkingDirectory(repo_path):

0 commit comments

Comments
 (0)