Move typos to pre-commit config (#4148)

This commit is contained in:
Calum Young 2023-04-29 17:13:35 +01:00 committed by GitHub
parent 03144b2fad
commit f0f4bf2929
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 16 deletions

View file

@ -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

View file

@ -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

View file

@ -7,3 +7,4 @@ hel = "hel"
whos = "whos"
spawnve = "spawnve"
ned = "ned"
poit = "poit"

View file

@ -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))

View file

@ -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))

View file

@ -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))