-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
67 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 |
---|---|---|
@@ -1,80 +1,29 @@ | ||
default_language_version: | ||
python: python3.11 | ||
python: python3.12 | ||
repos: | ||
- repo: local | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
# General file checkers | ||
- id: check-added-large-files | ||
name: Check added large files | ||
entry: check-added-large-files | ||
language: system | ||
- id: check-merge-conflict | ||
name: Check for merge conflict strings | ||
entry: check-merge-conflict | ||
language: system | ||
- id: check-case-conflict | ||
name: Check for problematic file names | ||
entry: check-case-conflict | ||
language: system | ||
|
||
# General text checkers | ||
- id: mixed-line-ending | ||
- id: end-of-file-fixer | ||
name: Fix End of Files | ||
entry: end-of-file-fixer | ||
language: system | ||
types: [text] | ||
stages: [commit, push, manual] | ||
- id: trailing-whitespace | ||
name: Trim Trailing Whitespace | ||
entry: trailing-whitespace-fixer | ||
language: system | ||
types: [text] | ||
stages: [commit, push, manual] | ||
- id: mixed-line-ending | ||
name: Mixed Line Ending | ||
entry: mixed-line-ending | ||
language: system | ||
types: [text] | ||
stages: [commit, push, manual] | ||
|
||
# Serialization format checkers | ||
- id: check-added-large-files | ||
- id: check-yaml | ||
name: Check Yaml | ||
entry: check-yaml | ||
language: system | ||
types: [yaml] | ||
- id: check-json | ||
name: Check JSON | ||
entry: check-json | ||
language: system | ||
types: [json] | ||
- id: check-toml | ||
name: Check Toml | ||
entry: check-toml | ||
language: system | ||
types: [toml] | ||
|
||
# Python tools | ||
- id: check-ast | ||
name: Check Python syntax | ||
entry: check-ast | ||
language: system | ||
types: [python] | ||
- id: darglint | ||
name: darglint | ||
entry: darglint | ||
language: system | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: "23.12.1" | ||
hooks: | ||
- id: black | ||
types: [python] | ||
stages: [manual] | ||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.11 | ||
hooks: | ||
- id: ruff | ||
name: ruff | ||
entry: ruff check --fix --exit-non-zero-on-fix | ||
language: system | ||
types_or: [python, jupyter] | ||
require_serial: true | ||
- id: black | ||
name: black | ||
entry: black | ||
language: system | ||
types_or: [python, jupyter] | ||
require_serial: true | ||
types: [python] | ||
args: [--fix] |