Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand Down
42 changes: 40 additions & 2 deletions cursorless-talon-dev/src/default_vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentionally written in community with .split() to reduce the syntactic noise so those new to Python would be more comfortable, right? I'm wondering if we should exclude this rule

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea about the original intent in community, but the alphabet has been stable for so long that I think it's fine to do this change here in Cursorless without any problems with future updates.

"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 = {
Expand Down
2 changes: 1 addition & 1 deletion cursorless-talon/src/cheatsheet/sections/destinations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
}

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading