Skip to content

Commit c6fcbf0

Browse files
committed
Python lint a bunch of files not currently python linted
1 parent 87f7b93 commit c6fcbf0

File tree

7 files changed

+17
-7
lines changed

7 files changed

+17
-7
lines changed

Diff for: utils/backtrace-check

+1
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,6 @@ formatting.""")
7979
# one stack trace entry.
8080
assert(found_stack_trace_entry)
8181

82+
8283
if __name__ == '__main__':
8384
main()

Diff for: utils/build-script

+11-7
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,13 @@ build_script_impl = os.path.join(
5757
SWIFT_SOURCE_ROOT, "swift", "utils", "build-script-impl")
5858

5959

60-
def exit_rejecting_arguments(message, parser = None):
60+
def exit_rejecting_arguments(message, parser=None):
6161
print(message, file=sys.stderr)
6262
if parser:
6363
parser.print_usage(sys.stderr)
6464
sys.exit(2) # 2 is the same as `argparse` error exit code.
6565

66+
6667
def call_without_sleeping(command, env=None, dry_run=False, echo=False):
6768
"""
6869
Execute a command during which system sleep is disabled.
@@ -321,9 +322,9 @@ class BuildScriptInvocation(object):
321322
"skip tvOS device tests.")
322323

323324
if args.watchos_all:
324-
exit_rejecting_arguments("error: --watchos-all is unavailable in " +
325-
"open-source Swift.\nUse --watchos to " +
326-
"skip watchOS device tests.")
325+
exit_rejecting_arguments("error: --watchos-all is unavailable " +
326+
"in open-source Swift.\nUse --watchos " +
327+
"to skip watchOS device tests.")
327328

328329
ninja_required = (
329330
args.cmake_generator == 'Ninja' or args.build_foundation)
@@ -1826,7 +1827,8 @@ iterations with -O",
18261827
help="also build for iOS, but disallow tests that require an iOS "
18271828
"device",
18281829
action="store_true")
1829-
parser.add_argument("-I", "--ios-all",
1830+
parser.add_argument(
1831+
"-I", "--ios-all",
18301832
help="also build for iOS, and allow all iOS tests",
18311833
action="store_true",
18321834
dest="ios_all")
@@ -1841,7 +1843,8 @@ iterations with -O",
18411843
help="also build for tvOS, but disallow tests that require a tvos "
18421844
"device",
18431845
action=arguments.action.optional_bool)
1844-
parser.add_argument("--tvos-all",
1846+
parser.add_argument(
1847+
"--tvos-all",
18451848
help="also build for tvOS, and allow all tvOS tests",
18461849
action=arguments.action.optional_bool,
18471850
dest="tvos_all")
@@ -1856,7 +1859,8 @@ iterations with -O",
18561859
help="also build for watchOS, but disallow tests that require an "
18571860
"watchOS device",
18581861
action=arguments.action.optional_bool)
1859-
parser.add_argument("--watchos-all",
1862+
parser.add_argument(
1863+
"--watchos-all",
18601864
help="also build for Apple watchOS, and allow all Apple watchOS tests",
18611865
action=arguments.action.optional_bool,
18621866
dest="watchos_all")

Diff for: utils/rth

+1
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,6 @@ def main():
151151

152152
return resilience_test.run()
153153

154+
154155
if __name__ == '__main__':
155156
exit(main())

Diff for: utils/run-test

+1
Original file line numberDiff line numberDiff line change
@@ -244,5 +244,6 @@ def main():
244244
# Do execute test
245245
shell.call(test_cmd)
246246

247+
247248
if __name__ == "__main__":
248249
main()

Diff for: utils/submit-benchmark-results

+1
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,6 @@ def main():
195195
if opts.submit_url:
196196
submit_results_to_server(lnt_result_data, opts.submit_url)
197197

198+
198199
if __name__ == '__main__':
199200
main()

Diff for: utils/swift-api-dump.py

+1
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def get_short_sdk_name(sdk):
243243
matched = re.match("[a-zA-Z]+", sdk)
244244
return matched.group(0)
245245

246+
246247
def create_dump_module_api_args(cmd_common, cmd_extra_args, sdk, module,
247248
target, output_dir, quiet, verbose):
248249

Diff for: utils/viewcfg

+1
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,6 @@ def main():
173173

174174
subprocess.call(["open", file_name])
175175

176+
176177
if __name__ == '__main__':
177178
main()

0 commit comments

Comments
 (0)