Fix lint issues.

This commit is contained in:
Brent Simmons 2025-01-22 22:38:37 -08:00
parent 6e7b419bf4
commit b7f82944c7
3 changed files with 19 additions and 6 deletions

View File

@ -1,8 +1,11 @@
identifier_name: identifier_name:
min_length: 1 min_length: 1
max_length: 40 max_length: 40
allowed_patterns: ^_.*$
line_length: line_length:
warning: 200 warning: 200
error: 300 error: 300
ignores_comments: true ignores_comments: true
ignores_urls: true ignores_urls: true

View File

@ -476,11 +476,11 @@ final class ReaderAPICaller: NSObject {
switch result { switch result {
case .success: case .success:
completion(.success(())) completion(.success(()))
case .failure(let error): case .failure(let error):
completion(.failure(error)) completion(.failure(error))
} }
}) })
case .failure(let error): case .failure(let error):
completion(.failure(error)) completion(.failure(error))
} }

View File

@ -47,7 +47,18 @@ class KeyboardManager {
static func createKeyCommand(title: String, action: String, input: String, modifiers: UIKeyModifierFlags) -> UIKeyCommand { static func createKeyCommand(title: String, action: String, input: String, modifiers: UIKeyModifierFlags) -> UIKeyCommand {
let selector = NSSelectorFromString(action) let selector = NSSelectorFromString(action)
let keyCommand = UIKeyCommand(title: title, image: nil, action: selector, input: input, modifierFlags: modifiers, propertyList: nil, alternates: [], discoverabilityTitle: nil, attributes: [], state: .on) let keyCommand = UIKeyCommand(
title: title,
image: nil,
action: selector,
input: input,
modifierFlags: modifiers,
propertyList: nil,
alternates: [],
discoverabilityTitle: nil,
attributes: [],
state: .on
)
keyCommand.wantsPriorityOverSystemBehavior = true keyCommand.wantsPriorityOverSystemBehavior = true
return keyCommand return keyCommand
} }
@ -91,12 +102,11 @@ private extension KeyboardManager {
return "\u{8}" return "\u{8}"
case "[deletefunction]": case "[deletefunction]":
return nil return nil
case "[tab]": case "[tab]":
return "\t" return "\t"
default: default:
return key return key
} }
} }
static func createKeyModifierFlags(keyEntry: [String: Any]) -> UIKeyModifierFlags { static func createKeyModifierFlags(keyEntry: [String: Any]) -> UIKeyModifierFlags {