Skip to content

Commit

Permalink
update pre-commit-config
Browse files Browse the repository at this point in the history
  • Loading branch information
tilen1976 committed Aug 5, 2024
1 parent d60405d commit aef91df
Showing 1 changed file with 16 additions and 67 deletions.
83 changes: 16 additions & 67 deletions .pre-commit-config.yaml
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]

0 comments on commit aef91df

Please sign in to comment.