Skip to content

Commit 093542e

Browse files
committed
lint
1 parent 8a5fe1a commit 093542e

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ disabled_rules:
33
- identifier_name
44
- blanket_disable_command
55
- non_optional_string_data_conversion
6+
- optional_data_string_conversion
67
excluded: # paths to ignore during linting. Takes precedence over `included`.
78
- Tests/ParseSwiftTests/ParseEncoderTests
89
- DerivedData

Sources/ParseSwift/API/API+Command.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ internal extension API {
100100
allowIntermediateResponses: Bool = false,
101101
uploadProgress: ((URLSessionTask, Int64, Int64, Int64) -> Void)? = nil,
102102
downloadProgress: ((URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? = nil,
103-
completion: @escaping(Result<U, ParseError>) -> Void) async {
103+
completion: @escaping (Result<U, ParseError>) -> Void) async {
104104
let currentNotificationQueue: DispatchQueue!
105105
if let notificationQueue = notificationQueue {
106106
currentNotificationQueue = notificationQueue
@@ -257,7 +257,7 @@ internal extension API {
257257
batching: Bool = false,
258258
childObjects: [String: PointerType]? = nil,
259259
childFiles: [String: ParseFile]? = nil,
260-
completion: @escaping(Result<URLRequest, ParseError>) -> Void) {
260+
completion: @escaping (Result<URLRequest, ParseError>) -> Void) {
261261
let params = self.params?.getURLQueryItems()
262262
Task {
263263
do {

Sources/ParseSwift/API/API+NonParseBodyCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ internal extension API {
3737
func execute(options: API.Options,
3838
callbackQueue: DispatchQueue,
3939
allowIntermediateResponses: Bool = false,
40-
completion: @escaping(Result<U, ParseError>) -> Void) async {
40+
completion: @escaping (Result<U, ParseError>) -> Void) async {
4141

4242
switch await self.prepareURLRequest(options: options) {
4343
case .success(let urlRequest):

Sources/ParseSwift/Extensions/URLSession.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ internal extension URLSession {
143143
attempts: Int = 1,
144144
allowIntermediateResponses: Bool,
145145
mapper: @escaping (Data) async throws -> U,
146-
completion: @escaping(Result<U, ParseError>) -> Void
146+
completion: @escaping (Result<U, ParseError>) -> Void
147147
) async {
148148
do {
149149
let (responseData, urlResponse) = try await dataTask(for: request)
@@ -288,7 +288,7 @@ internal extension URLSession {
288288
from file: URL?,
289289
progress: ((URLSessionTask, Int64, Int64, Int64) -> Void)?,
290290
mapper: @escaping (Data) async throws -> U,
291-
completion: @escaping(Result<U, ParseError>) -> Void
291+
completion: @escaping (Result<U, ParseError>) -> Void
292292
) {
293293
var task: URLSessionTask?
294294
if let data = data {
@@ -354,7 +354,7 @@ internal extension URLSession {
354354
with request: URLRequest,
355355
progress: ((URLSessionDownloadTask, Int64, Int64, Int64) -> Void)?,
356356
mapper: @escaping (Data) async throws -> U,
357-
completion: @escaping(Result<U, ParseError>) -> Void
357+
completion: @escaping (Result<U, ParseError>) -> Void
358358
) async {
359359
let task = downloadTask(with: request) { (location, urlResponse, responseError) in
360360
Task {
@@ -374,7 +374,7 @@ internal extension URLSession {
374374
func downloadTask<U>(
375375
with request: URLRequest,
376376
mapper: @escaping (Data) async throws -> U,
377-
completion: @escaping(Result<U, ParseError>) -> Void
377+
completion: @escaping (Result<U, ParseError>) -> Void
378378
) {
379379
Task {
380380
do {

Sources/ParseSwift/Storage/ParseFileManager.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ extension ParseFileManager {
112112
}
113113
}
114114

115-
func writeString(_ string: String, filePath: URL, completion: @escaping(Error?) -> Void) {
115+
func writeString(_ string: String, filePath: URL, completion: @escaping (Error?) -> Void) {
116116
synchronizationQueue.async {
117117
do {
118118
guard let data = string.data(using: .utf8) else {
@@ -127,7 +127,7 @@ extension ParseFileManager {
127127
}
128128
}
129129

130-
func writeData(_ data: Data, filePath: URL, completion: @escaping(Error?) -> Void) {
130+
func writeData(_ data: Data, filePath: URL, completion: @escaping (Error?) -> Void) {
131131
synchronizationQueue.async {
132132
do {
133133
try data.write(to: filePath, options: self.defaultDataWritingOptions)
@@ -138,7 +138,7 @@ extension ParseFileManager {
138138
}
139139
}
140140

141-
func copyItem(_ fromPath: URL, toPath: URL, completion: @escaping(Error?) -> Void) {
141+
func copyItem(_ fromPath: URL, toPath: URL, completion: @escaping (Error?) -> Void) {
142142
synchronizationQueue.async {
143143
do {
144144
try FileManager.default.copyItem(at: fromPath, to: toPath)
@@ -149,7 +149,7 @@ extension ParseFileManager {
149149
}
150150
}
151151

152-
func moveItem(_ fromPath: URL, toPath: URL, completion: @escaping(Error?) -> Void) {
152+
func moveItem(_ fromPath: URL, toPath: URL, completion: @escaping (Error?) -> Void) {
153153
synchronizationQueue.async {
154154
if fromPath != toPath {
155155
do {
@@ -164,7 +164,7 @@ extension ParseFileManager {
164164
}
165165
}
166166

167-
func moveContentsOfDirectory(_ fromPath: URL, toPath: URL, completion: @escaping(Error?) -> Void) {
167+
func moveContentsOfDirectory(_ fromPath: URL, toPath: URL, completion: @escaping (Error?) -> Void) {
168168
synchronizationQueue.async {
169169
do {
170170
if fromPath == toPath {

Sources/ParseSwift/Types/ParsePushPayload/Apple/ParsePushPayloadAppleLiveActivity.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public struct ParsePushPayloadAppleLiveActivity: ParsePushApplePayload {
1919
case end
2020
}
2121

22-
public var event : Event?
22+
public var event: Event?
2323

2424
public var contentAvailable: Int?
2525

0 commit comments

Comments
 (0)