-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
84 lines (77 loc) · 1.98 KB
/
.pre-commit-config.yaml
File metadata and controls
84 lines (77 loc) · 1.98 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Pre-commit hooks configuration
# See https://pre-commit.com for more information
repos:
# Basic file checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
name: Trim trailing whitespace
- id: end-of-file-fixer
name: Fix end of files
- id: check-yaml
name: Check YAML files
- id: check-toml
name: Check TOML files
- id: check-json
name: Check JSON files
- id: check-added-large-files
name: Check for large files
args: ['--maxkb=1000']
- id: check-merge-conflict
name: Check for merge conflicts
- id: check-case-conflict
name: Check for case conflicts
- id: detect-private-key
name: Detect private keys
- id: mixed-line-ending
name: Check mixed line endings
# Python import sorting
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: Sort imports with isort
# Python code formatting
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
name: Format code with black
language_version: python3.11
# Python linting
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
name: Lint with flake8
additional_dependencies:
- flake8-docstrings
- flake8-bugbear
# Python type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
hooks:
- id: mypy
name: Type check with mypy
additional_dependencies:
- types-redis
- types-requests
args: ['--ignore-missing-imports', '--install-types', '--non-interactive']
files: ^app/
# Global settings
default_language_version:
python: python3.11
# Exclude patterns
exclude: |
(?x)(
^\.git/|
^\.pytest_cache/|
^\.mypy_cache/|
^__pycache__/|
^\.venv/|
^venv/|
^build/|
^dist/|
\.pyc$
)