Skip to content

Commit f234387

Browse files
authored
Lint (#262)
* Bash quotes * apply format
1 parent 3f1a93f commit f234387

File tree

5 files changed

+15
-23
lines changed

5 files changed

+15
-23
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
echo "### Here's how to fix the formatting locally:" >> $GITHUB_STEP_SUMMARY
3636
echo "" >> $GITHUB_STEP_SUMMARY
37-
echo "```bash" >> $GITHUB_STEP_SUMMARY
37+
echo '```bash' >> $GITHUB_STEP_SUMMARY
3838
echo "# Format all Swift files" >> $GITHUB_STEP_SUMMARY
3939
echo 'swift format -i --recursive .' >> $GITHUB_STEP_SUMMARY
4040
echo '```' >> $GITHUB_STEP_SUMMARY

Sources/Tokenizers/String+PreTokenization.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Foundation
2+
23
import struct Hub.Config
34

45
enum StringSplitPattern {

Tests/TokenizersTests/ChatTemplateTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import Foundation
99
import Testing
10+
1011
@testable import Tokenizers
1112

1213
@Suite("Chat Template Tests")

Tests/TokenizersTests/FactoryTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import Foundation
99
import Hub
1010
import Testing
11+
1112
@testable import Tokenizers
1213

1314
private func makeHubApi() -> (api: HubApi, downloadDestination: URL) {

Tests/TokenizersTests/PreTokenizerTests.swift

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -179,64 +179,53 @@ struct PreTokenizerTests {
179179
@Test("Split behavior merged with previous")
180180
func splitBehaviorMergedWithPrevious() {
181181
#expect(
182-
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) ==
183-
["the-", "final-", "-", "countdown"]
182+
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) == ["the-", "final-", "-", "countdown"]
184183
)
185184

186185
#expect(
187-
"the-final--countdown-".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) ==
188-
["the-", "final-", "-", "countdown-"]
186+
"the-final--countdown-".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) == ["the-", "final-", "-", "countdown-"]
189187
)
190188

191189
#expect(
192-
"the-final--countdown--".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) ==
193-
["the-", "final-", "-", "countdown-", "-"]
190+
"the-final--countdown--".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) == ["the-", "final-", "-", "countdown-", "-"]
194191
)
195192

196193
#expect(
197-
"-the-final--countdown--".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) ==
198-
["-", "the-", "final-", "-", "countdown-", "-"]
194+
"-the-final--countdown--".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) == ["-", "the-", "final-", "-", "countdown-", "-"]
199195
)
200196

201197
#expect(
202-
"--the-final--countdown--".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) ==
203-
["-", "-", "the-", "final-", "-", "countdown-", "-"]
198+
"--the-final--countdown--".split(by: "-", options: .caseInsensitive, behavior: .mergedWithPrevious) == ["-", "-", "the-", "final-", "-", "countdown-", "-"]
204199
)
205200
}
206201

207202
@Test("Split behavior merged with next")
208203
func splitBehaviorMergedWithNext() {
209204
#expect(
210-
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) ==
211-
["the", "-final", "-", "-countdown"]
205+
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) == ["the", "-final", "-", "-countdown"]
212206
)
213207

214208
#expect(
215-
"-the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) ==
216-
["-the", "-final", "-", "-countdown"]
209+
"-the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) == ["-the", "-final", "-", "-countdown"]
217210
)
218211

219212
#expect(
220-
"--the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) ==
221-
["-", "-the", "-final", "-", "-countdown"]
213+
"--the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) == ["-", "-the", "-final", "-", "-countdown"]
222214
)
223215

224216
#expect(
225-
"--the-final--countdown-".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) ==
226-
["-", "-the", "-final", "-", "-countdown", "-"]
217+
"--the-final--countdown-".split(by: "-", options: .caseInsensitive, behavior: .mergedWithNext) == ["-", "-the", "-final", "-", "-countdown", "-"]
227218
)
228219
}
229220

230221
@Test("Split behavior other")
231222
func splitBehaviorOther() {
232223
#expect(
233-
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .isolated) ==
234-
["the", "-", "final", "-", "-", "countdown"]
224+
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .isolated) == ["the", "-", "final", "-", "-", "countdown"]
235225
)
236226

237227
#expect(
238-
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .removed) ==
239-
["the", "final", "countdown"]
228+
"the-final--countdown".split(by: "-", options: .caseInsensitive, behavior: .removed) == ["the", "final", "countdown"]
240229
)
241230
}
242231

0 commit comments

Comments
 (0)