-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
44 lines (41 loc) · 1.2 KB
/
.pre-commit-config.yaml
File metadata and controls
44 lines (41 loc) · 1.2 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
# Pre-commit hooks configuration
# Install with: pre-commit install
# Run manually with: pre-commit run --all-files
repos:
# Ruff - Fast Python linter and formatter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
# Run the linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter
- id: ruff-format
# General file hygiene
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
# Trim trailing whitespace
- id: trailing-whitespace
# Ensure files end with a newline
- id: end-of-file-fixer
# Check YAML syntax
- id: check-yaml
# Check JSON syntax
- id: check-json
# Check TOML syntax
- id: check-toml
# Detect private keys
- id: detect-private-key
# Check for merge conflict markers
- id: check-merge-conflict
# Check for large files
- id: check-added-large-files
args: ['--maxkb=1000']
# Type checking with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: [pandas-stubs, numpy]
args: [--ignore-missing-imports]