mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 21:43:52 +00:00
Move typos to pre-commit config (#4148)
This commit is contained in:
parent
03144b2fad
commit
f0f4bf2929
6 changed files with 13 additions and 16 deletions
9
.github/workflows/ci.yaml
vendored
9
.github/workflows/ci.yaml
vendored
|
@ -121,15 +121,6 @@ jobs:
|
||||||
- run: cargo check
|
- run: cargo check
|
||||||
- run: cargo fmt --all --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:
|
ecosystem:
|
||||||
name: "ecosystem"
|
name: "ecosystem"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -23,6 +23,11 @@ repos:
|
||||||
- MD033 # no-inline-html
|
- MD033 # no-inline-html
|
||||||
- --
|
- --
|
||||||
|
|
||||||
|
- repo: https://github.com/crate-ci/typos
|
||||||
|
rev: v1.14.8
|
||||||
|
hooks:
|
||||||
|
- id: typos
|
||||||
|
|
||||||
- repo: local
|
- repo: local
|
||||||
hooks:
|
hooks:
|
||||||
- id: cargo-fmt
|
- id: cargo-fmt
|
||||||
|
|
|
@ -7,3 +7,4 @@ hel = "hel"
|
||||||
whos = "whos"
|
whos = "whos"
|
||||||
spawnve = "spawnve"
|
spawnve = "spawnve"
|
||||||
ned = "ned"
|
ned = "ned"
|
||||||
|
poit = "poit"
|
||||||
|
|
|
@ -85,7 +85,7 @@ def foo2(list_a, list_b):
|
||||||
|
|
||||||
def foo3(list_a, list_b):
|
def foo3(list_a, list_b):
|
||||||
return (
|
return (
|
||||||
# Standlone comment but weirdly placed.
|
# Standalone comment but weirdly placed.
|
||||||
User.query.filter(User.foo == "bar")
|
User.query.filter(User.foo == "bar")
|
||||||
.filter(
|
.filter(
|
||||||
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
||||||
|
|
|
@ -85,7 +85,7 @@ def foo2(list_a, list_b):
|
||||||
|
|
||||||
def foo3(list_a, list_b):
|
def foo3(list_a, list_b):
|
||||||
return (
|
return (
|
||||||
# Standlone comment but weirdly placed.
|
# Standalone comment but weirdly placed.
|
||||||
User.query.filter(User.foo == "bar")
|
User.query.filter(User.foo == "bar")
|
||||||
.filter(
|
.filter(
|
||||||
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
||||||
|
|
|
@ -93,7 +93,7 @@ def foo2(list_a, list_b):
|
||||||
|
|
||||||
def foo3(list_a, list_b):
|
def foo3(list_a, list_b):
|
||||||
return (
|
return (
|
||||||
# Standlone comment but weirdly placed.
|
# Standalone comment but weirdly placed.
|
||||||
User.query.filter(User.foo == "bar")
|
User.query.filter(User.foo == "bar")
|
||||||
.filter(
|
.filter(
|
||||||
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
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):
|
def foo3(list_a, list_b):
|
||||||
- return (
|
- return (
|
||||||
- # Standlone comment but weirdly placed.
|
- # Standalone comment but weirdly placed.
|
||||||
- User.query.filter(User.foo == "bar")
|
- User.query.filter(User.foo == "bar")
|
||||||
- .filter(
|
- .filter(
|
||||||
- db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
- db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
||||||
- )
|
- )
|
||||||
- .filter(User.xyz.is_(None))
|
- .filter(User.xyz.is_(None))
|
||||||
- )
|
- )
|
||||||
+ return # Standlone comment but weirdly placed.
|
+ return # Standalone comment but weirdly placed.
|
||||||
+ User.query.filter(User.foo == "bar").filter(
|
+ User.query.filter(User.foo == "bar").filter(
|
||||||
+ db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
+ db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
||||||
+ ).filter(User.xyz.is_(None))
|
+ ).filter(User.xyz.is_(None))
|
||||||
|
@ -327,7 +327,7 @@ def foo2(list_a, list_b):
|
||||||
|
|
||||||
|
|
||||||
def foo3(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(
|
User.query.filter(User.foo == "bar").filter(
|
||||||
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
||||||
).filter(User.xyz.is_(None))
|
).filter(User.xyz.is_(None))
|
||||||
|
@ -423,7 +423,7 @@ def foo2(list_a, list_b):
|
||||||
|
|
||||||
def foo3(list_a, list_b):
|
def foo3(list_a, list_b):
|
||||||
return (
|
return (
|
||||||
# Standlone comment but weirdly placed.
|
# Standalone comment but weirdly placed.
|
||||||
User.query.filter(User.foo == "bar")
|
User.query.filter(User.foo == "bar")
|
||||||
.filter(
|
.filter(
|
||||||
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
db.or_(User.field_a.astext.in_(list_a), User.field_b.astext.in_(list_b))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue