-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: add pre-commit, typos and ruff, fix several (#64)
- Loading branch information
Showing
70 changed files
with
689 additions
and
500 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 # Use the ref you want to point at | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-vcs-permalinks | ||
- id: check-yaml | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: fix-byte-order-marker | ||
- id: mixed-line-ending | ||
# - id: trailing-whitespace | ||
# Python-specific | ||
- id: check-ast | ||
- id: check-docstring-first | ||
- id: debug-statements | ||
|
||
- repo: https://github.com/crate-ci/typos | ||
rev: v1.16.23 | ||
hooks: | ||
- id: typos | ||
args: [] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.7 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
- id: ruff-format | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.3.0' | ||
hooks: | ||
- id: mypy | ||
pass_filenames: false | ||
args: [--package=guppy] | ||
additional_dependencies: [ | ||
ormsgpack, | ||
pydantic, | ||
] | ||
|
||
- repo: local | ||
hooks: | ||
- id: cargo-check | ||
name: Cargo check | ||
entry: bash -c 'cd validator && exec cargo check' | ||
pass_filenames: false | ||
types: [file, rust] | ||
language: system | ||
- id: rust-linting | ||
name: Rust linting | ||
entry: bash -c 'cd validator && exec cargo fmt --all --' | ||
pass_filenames: true | ||
types: [file, rust] | ||
language: system | ||
- id: rust-clippy | ||
name: Rust clippy | ||
entry: bash -c 'cd validator && exec cargo clippy --all-targets --all-features -- -Dclippy::all' | ||
pass_filenames: false | ||
types: [file, rust] | ||
language: system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[default.extend-words] | ||
inot = "inot" | ||
fle = "fle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include *.toml | ||
include *.txt | ||
include *.yaml | ||
recursive-include examples *.ipynb | ||
recursive-include guppy *.py | ||
recursive-include tests *.err | ||
recursive-include tests *.py | ||
recursive-include tests *.sh | ||
recursive-exclude validator *.lock | ||
recursive-exclude validator *.rs | ||
recursive-exclude validator *.toml | ||
exclude .git-blame-ignore-revs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.