diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 514e461362..2a75bd59ad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -121,15 +121,6 @@ jobs: - run: cargo check - run: cargo fmt --all --check - typos: - name: "spell check" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: crate-ci/typos@master - with: - files: . - ecosystem: name: "ecosystem" runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da2807fd09..bb10740493 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,6 +23,11 @@ repos: - MD033 # no-inline-html - -- + - repo: https://github.com/crate-ci/typos + rev: v1.14.8 + hooks: + - id: typos + - repo: local hooks: - id: cargo-fmt diff --git a/_typos.toml b/_typos.toml index c0c02513b5..8f5f834f9b 100644 --- a/_typos.toml +++ b/_typos.toml @@ -7,3 +7,4 @@ hel = "hel" whos = "whos" spawnve = "spawnve" ned = "ned" +poit = "poit" diff --git a/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py b/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py index 2147d41c9d..9f4f39d835 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py +++ b/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py @@ -85,7 +85,7 @@ def foo2(list_a, list_b): def foo3(list_a, list_b): return ( - # Standlone comment but weirdly placed. + # Standalone comment but weirdly placed. User.query.filter(User.foo == "bar") .filter( db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b)) diff --git a/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py.expect b/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py.expect index 2147d41c9d..9f4f39d835 100644 --- a/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py.expect +++ b/crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py.expect @@ -85,7 +85,7 @@ def foo2(list_a, list_b): def foo3(list_a, list_b): return ( - # Standlone comment but weirdly placed. + # Standalone comment but weirdly placed. User.query.filter(User.foo == "bar") .filter( db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b)) diff --git a/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__black_test__comments4_py.snap b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__black_test__comments4_py.snap index 662947d62f..d246955bc6 100644 --- a/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__black_test__comments4_py.snap +++ b/crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__black_test__comments4_py.snap @@ -93,7 +93,7 @@ def foo2(list_a, list_b): def foo3(list_a, list_b): return ( - # Standlone comment but weirdly placed. + # Standalone comment but weirdly placed. User.query.filter(User.foo == "bar") .filter( db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b)) @@ -221,14 +221,14 @@ def foo3(list_a, list_b): def foo3(list_a, list_b): - return ( -- # Standlone comment but weirdly placed. +- # Standalone comment but weirdly placed. - User.query.filter(User.foo == "bar") - .filter( - db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b)) - ) - .filter(User.xyz.is_(None)) - ) -+ return # Standlone comment but weirdly placed. ++ return # Standalone comment but weirdly placed. + User.query.filter(User.foo == "bar").filter( + db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b)) + ).filter(User.xyz.is_(None)) @@ -327,7 +327,7 @@ def foo2(list_a, list_b): def foo3(list_a, list_b): - return # Standlone comment but weirdly placed. + return # Standalone comment but weirdly placed. User.query.filter(User.foo == "bar").filter( db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b)) ).filter(User.xyz.is_(None)) @@ -423,7 +423,7 @@ def foo2(list_a, list_b): def foo3(list_a, list_b): return ( - # Standlone comment but weirdly placed. + # Standalone comment but weirdly placed. User.query.filter(User.foo == "bar") .filter( db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))