-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
64 lines (59 loc) · 1.67 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
64 lines (59 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Pre-commit configuration for stocktrim-openapi-client
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# Ruff - Fast Python linter and formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.3
hooks:
# Run the linter
- id: ruff
args: [--fix]
# Run the formatter
- id: ruff-format
# General pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--allow-multiple-documents, --unsafe]
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: mixed-line-ending
args: [--fix=lf]
# Markdown formatting
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
hooks:
- id: mdformat
args: [--wrap=88]
exclude: '(CHANGELOG\.md|docs/CHANGELOG\.md)'
additional_dependencies:
- mdformat-gfm
- mdformat-tables
- mdformat-frontmatter
# YAML linting
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.37.1
hooks:
- id: yamllint
args: [-c=.yamllint.yml]
# Run linting (includes type checking)
- repo: local
hooks:
- id: lint
name: lint
entry: bash -c 'uv run poe lint'
language: system
pass_filenames: false
always_run: true
- id: pytest
name: pytest
entry: bash -c 'uv run poe test'
language: system
pass_filenames: false
always_run: true