Skip to content

Commit

Permalink
Merge branch 'main' into pokey/attempt-to-make-macos-ci-more-robust
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey authored Apr 27, 2024
2 parents 799b209 + a02b6a6 commit 9a844e8
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/forbid-todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Forbid TODO

on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
branches: [main]

jobs:
forbid-todo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Forbid TODO
run: ./scripts/forbid-todo.sh
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,3 @@ jobs:
name: dumps
path: ${{ env.VSCODE_CRASH_DIR }}
if: failure()
- name: Forbid TODOs
run: ./scripts/forbid-todo.sh
7 changes: 2 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ repos:
hooks:
- id: flynt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.11
rev: v0.4.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
hooks:
- id: black
- id: ruff-format
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Place your settings in this file to overwrite default and user settings.
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
"editor.defaultFormatter": "charliermarsh.ruff"
},
"[scm]": {
"editor.defaultFormatter": "AndreasArvidsson.andreas-talon"
Expand Down
2 changes: 1 addition & 1 deletion cursorless-talon/src/marks/decorated_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def cursorless_grapheme(m) -> str:
except AttributeError:
# NB: This represents unknown char in Unicode. It will be translated
# to "[unk]" by Cursorless extension.
return "\uFFFD"
return "\ufffd"


@mod.capture(
Expand Down
2 changes: 1 addition & 1 deletion cursorless-talon/src/private_api/private_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def cursorless_private_build_primitive_target(
return PrimitiveTarget(mark, modifiers)

def cursorless_private_build_list_target(
elements: list[Union[PrimitiveTarget, RangeTarget]]
elements: list[Union[PrimitiveTarget, RangeTarget]],
) -> Union[PrimitiveTarget, ListTarget]:
"""Cursorless private api low-level target builder: Create a list target"""
if len(elements) == 1:
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ force-exclude = '''
'''

[tool.ruff]
select = ["E", "F", "C4", "I001", "UP", "SIM"]
ignore = ["E501", "SIM105", "UP007", "UP035"]
target-version = "py311"
extend-exclude = ["vendor", "data/playground/**/*.py"]

[tool.ruff.lint]
select = ["E", "F", "C4", "I001", "UP", "SIM"]
ignore = ["E501", "SIM105", "UP007", "UP035"]

[tool.pyright]
reportSelfClsParameterName = false
2 changes: 1 addition & 1 deletion scripts/forbid-todo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

# Find the string 'TODO' in all files tracked by git, excluding
# this file
TODOS_FOUND=$(git grep --color=always -nw TODO -- ':!scripts/forbid-todo.sh' || true)
TODOS_FOUND=$(git grep --color=always -nw TODO -- ':!scripts/forbid-todo.sh' ':!.github/workflows/forbid-todo.yml' || true)

if [ -n "$TODOS_FOUND" ]; then
printf "\e[1;31mERROR: \e[0mTODOs found in codebase:\n"
Expand Down

0 comments on commit 9a844e8

Please sign in to comment.