Skip to content

Commit 7199b91

Browse files
committed
Fix Python imports, bump vendored swift-format version
1 parent 60bf6b3 commit 7199b91

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Utilities/format.py

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

3+
import argparse
34
import subprocess
45
import os
56

@@ -11,12 +12,12 @@ def run(arguments):
1112
subprocess.run(arguments, check=True)
1213

1314

14-
def build_swift_format():
15+
def build_swift_format() -> list[str]:
1516
# Build swift-format
1617
package_path = os.path.join(SOURCE_ROOT, "Vendor", "swift-format")
1718
bin_path = os.path.join(package_path, ".build", "release", "swift-format")
1819
if os.path.exists(bin_path):
19-
return bin_path
20+
return [bin_path]
2021

2122
run(["./Vendor/checkout-dependency", "swift-format"])
2223

@@ -32,7 +33,7 @@ def main():
3233
description='Ensures that codebase formatting is consistent')
3334
parser.add_argument('-b', '--build-swift-format', action='store_true')
3435
args = parser.parse_args()
35-
36+
3637
targets = []
3738
for targets_dir in ["Sources", "Tests"]:
3839
targets_path = os.path.join(SOURCE_ROOT, targets_dir)

Vendor/dependencies.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"swift-format": {
1818
"repository": "https://github.com/swiftlang/swift-format.git",
19-
"revision": "c7a8b752e35d96577d1e9191d27cd9ea57dce2f2",
19+
"revision": "62eaad2822b865407b8cde56c36386c00800f7ec",
2020
"categories": ["default"]
2121
},
2222
"wish-you-were-fast": {

0 commit comments

Comments
 (0)