summaryrefslogtreecommitdiff
path: root/Sora/Data/Booru
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-03-24 06:37:11 +0000
committerFuwn <[email protected]>2026-03-24 06:37:11 +0000
commitd6e2309de041c69bf36ea4027bebabace891634d (patch)
treedd2fe7b0e3a89c2be146c2e08a3c426aecadcee6 /Sora/Data/Booru
parenttest: update source analysis assertions (diff)
downloadsora-testing-d6e2309de041c69bf36ea4027bebabace891634d.tar.xz
sora-testing-d6e2309de041c69bf36ea4027bebabace891634d.zip
style(Sora): Run formatter
Diffstat (limited to 'Sora/Data/Booru')
-rw-r--r--Sora/Data/Booru/BooruNetworkImageLoader.swift14
-rw-r--r--Sora/Data/Booru/Tag/DanbooruTagParser.swift3
-rw-r--r--Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift3
3 files changed, 12 insertions, 8 deletions
diff --git a/Sora/Data/Booru/BooruNetworkImageLoader.swift b/Sora/Data/Booru/BooruNetworkImageLoader.swift
index c2a0f8a..8005550 100644
--- a/Sora/Data/Booru/BooruNetworkImageLoader.swift
+++ b/Sora/Data/Booru/BooruNetworkImageLoader.swift
@@ -29,12 +29,14 @@ actor BooruNetworkImageLoader: NetworkImageLoader {
let customUserAgent = self.customUserAgent
let task = Task<CGImage, Error> {
- guard let data = await ImageCacheManager.shared.loadImageData(
- for: url,
- domain: domain,
- sendUserAgent: sendUserAgent,
- customUserAgent: customUserAgent
- ) else {
+ guard
+ let data = await ImageCacheManager.shared.loadImageData(
+ for: url,
+ domain: domain,
+ sendUserAgent: sendUserAgent,
+ customUserAgent: customUserAgent
+ )
+ else {
throw URLError(.badServerResponse)
}
diff --git a/Sora/Data/Booru/Tag/DanbooruTagParser.swift b/Sora/Data/Booru/Tag/DanbooruTagParser.swift
index 3da165a..9c48e11 100644
--- a/Sora/Data/Booru/Tag/DanbooruTagParser.swift
+++ b/Sora/Data/Booru/Tag/DanbooruTagParser.swift
@@ -9,7 +9,8 @@ nonisolated class DanbooruTagParser {
func parse() -> [BooruTag] {
do {
- guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]] else {
+ guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]]
+ else {
debugPrint("DanbooruTagParser.parse: failed to decode top-level tag array.")
return []
diff --git a/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift b/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift
index c69cd9b..fb57437 100644
--- a/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift
+++ b/Sora/Data/Booru/Tag/GelbooruAutocompleteTagParser.swift
@@ -9,7 +9,8 @@ nonisolated class GelbooruAutocompleteTagParser {
func parse() -> [BooruTag] {
do {
- guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]] else {
+ guard let decodedTags = try JSONSerialization.jsonObject(with: data) as? [[String: Any]]
+ else {
debugPrint("GelbooruAutocompleteTagParser.parse: failed to decode top-level tag array.")
return []