Skip to content

Commit f0f4bf2

Browse files
authored
Move typos to pre-commit config (#4148)
1 parent 03144b2 commit f0f4bf2

6 files changed

Lines changed: 13 additions & 16 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,6 @@ jobs:
121121
- run: cargo check
122122
- run: cargo fmt --all --check
123123

124-
typos:
125-
name: "spell check"
126-
runs-on: ubuntu-latest
127-
steps:
128-
- uses: actions/checkout@v3
129-
- uses: crate-ci/typos@master
130-
with:
131-
files: .
132-
133124
ecosystem:
134125
name: "ecosystem"
135126
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ repos:
2323
- MD033 # no-inline-html
2424
- --
2525

26+
- repo: https://github.com/crate-ci/typos
27+
rev: v1.14.8
28+
hooks:
29+
- id: typos
30+
2631
- repo: local
2732
hooks:
2833
- id: cargo-fmt

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ hel = "hel"
77
whos = "whos"
88
spawnve = "spawnve"
99
ned = "ned"
10+
poit = "poit"

crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def foo2(list_a, list_b):
8585

8686
def foo3(list_a, list_b):
8787
return (
88-
# Standlone comment but weirdly placed.
88+
# Standalone comment but weirdly placed.
8989
User.query.filter(User.foo == "bar")
9090
.filter(
9191
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))

crates/ruff_python_formatter/resources/test/fixtures/black/simple_cases/comments4.py.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def foo2(list_a, list_b):
8585

8686
def foo3(list_a, list_b):
8787
return (
88-
# Standlone comment but weirdly placed.
88+
# Standalone comment but weirdly placed.
8989
User.query.filter(User.foo == "bar")
9090
.filter(
9191
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))

crates/ruff_python_formatter/src/snapshots/ruff_python_formatter__tests__black_test__comments4_py.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def foo2(list_a, list_b):
9393
9494
def foo3(list_a, list_b):
9595
return (
96-
# Standlone comment but weirdly placed.
96+
# Standalone comment but weirdly placed.
9797
User.query.filter(User.foo == "bar")
9898
.filter(
9999
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):
221221
222222
def foo3(list_a, list_b):
223223
- return (
224-
- # Standlone comment but weirdly placed.
224+
- # Standalone comment but weirdly placed.
225225
- User.query.filter(User.foo == "bar")
226226
- .filter(
227227
- db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
228228
- )
229229
- .filter(User.xyz.is_(None))
230230
- )
231-
+ return # Standlone comment but weirdly placed.
231+
+ return # Standalone comment but weirdly placed.
232232
+ User.query.filter(User.foo == "bar").filter(
233233
+ db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
234234
+ ).filter(User.xyz.is_(None))
@@ -327,7 +327,7 @@ def foo2(list_a, list_b):
327327
328328
329329
def foo3(list_a, list_b):
330-
return # Standlone comment but weirdly placed.
330+
return # Standalone comment but weirdly placed.
331331
User.query.filter(User.foo == "bar").filter(
332332
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
333333
).filter(User.xyz.is_(None))
@@ -423,7 +423,7 @@ def foo2(list_a, list_b):
423423
424424
def foo3(list_a, list_b):
425425
return (
426-
# Standlone comment but weirdly placed.
426+
# Standalone comment but weirdly placed.
427427
User.query.filter(User.foo == "bar")
428428
.filter(
429429
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))

0 commit comments

Comments
 (0)