diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d28d21b50..488dfdbca6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -minimum_pre_commit_version: "2.9.0" +minimum_pre_commit_version: "3.2.0" ci: autoupdate_schedule: monthly exclude: /vendor/|^data/playground/ @@ -15,11 +15,11 @@ repos: language: fail types: [symlink] - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.1 + rev: v1.5.6 hooks: - id: forbid-crlf - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -71,12 +71,8 @@ repos: files: ^data/fixtures/recorded/.*/[^/]*\.yml$ language: system entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts --check-marks - - repo: https://github.com/ikamensh/flynt - rev: "1.0.6" - hooks: - - id: flynt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.1 + rev: v0.15.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/cursorless-talon-dev/src/default_vocabulary.py b/cursorless-talon-dev/src/default_vocabulary.py index 62445cd38e..79219c8a16 100644 --- a/cursorless-talon-dev/src/default_vocabulary.py +++ b/cursorless-talon-dev/src/default_vocabulary.py @@ -12,10 +12,48 @@ """ # https://github.com/talonhub/community/blob/9acb6c9659bb0c9b794a7b7126d025603b4ed726/core/keys/keys.py#L10 -initial_default_alphabet = "air bat cap drum each fine gust harp sit jury crunch look made near odd pit quench red sun trap urge vest whale plex yank zip".split() +initial_default_alphabet = [ + "air", + "bat", + "cap", + "drum", + "each", + "fine", + "gust", + "harp", + "sit", + "jury", + "crunch", + "look", + "made", + "near", + "odd", + "pit", + "quench", + "red", + "sun", + "trap", + "urge", + "vest", + "whale", + "plex", + "yank", + "zip", +] # https://github.com/talonhub/community/blob/9acb6c9659bb0c9b794a7b7126d025603b4ed726/core/keys/keys.py#L24 -digits = "zero one two three four five six seven eight nine".split() +digits = [ + "zero", + "one", + "two", + "three", + "four", + "five", + "six", + "seven", + "eight", + "nine", +] # https://github.com/talonhub/community/blob/9acb6c9659bb0c9b794a7b7126d025603b4ed726/core/keys/keys.py#L139C1-L171C2 punctuation_words = { diff --git a/cursorless-talon/src/cheatsheet/sections/destinations.py b/cursorless-talon/src/cheatsheet/sections/destinations.py index 6c08e3b41a..2c5fd1a832 100644 --- a/cursorless-talon/src/cheatsheet/sections/destinations.py +++ b/cursorless-talon/src/cheatsheet/sections/destinations.py @@ -3,7 +3,7 @@ def get_destinations() -> list[ListItemDescriptor]: insertion_modes = { - **{p: "to" for p in get_raw_list("insertion_mode_to")}, + **dict.fromkeys(get_raw_list("insertion_mode_to"), "to"), **get_raw_list("insertion_mode_before_after"), } diff --git a/pyproject.toml b/pyproject.toml index f31b824fea..a2613c4c79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,8 +12,8 @@ target-version = "py311" extend-exclude = ["vendor", "data/playground/**/*.py"] [tool.ruff.lint] -select = ["E", "F", "C4", "I001", "UP", "SIM"] -ignore = ["E501", "SIM105", "UP007", "UP035"] +select = ["E", "F", "C4", "I001", "UP", "SIM", "FLY"] +ignore = ["E501", "SIM105", "UP007", "UP035", "UP045"] [tool.pyright] reportSelfClsParameterName = false