-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (65 loc) · 1.96 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
69 lines (65 loc) · 1.96 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
# Pre-commit hooks configuration for Serverless Telegram Bot Starter project
# See https://pre-commit.com for more information
repos:
# General file checks (spaces, large files, yaml syntax)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe] # Allow custom tags in YAML
- id: check-json
- id: check-merge-conflict
- id: check-case-conflict
- id: check-toml
- id: mixed-line-ending
args: [--fix=lf] # Use LF line endings
- id: check-added-large-files
args: [--maxkb=2048] # Block files larger than 2MB
exclude: |
assets/|
# Black: Python code formatting - forces consistency
- repo: https://github.com/psf/black
rev: 25.11.0
hooks:
- id: black
language_version: python3.13
args: [--line-length=120]
exclude: |
(?x)^(
\.venv/|
venv/|
__pycache__/|
\.git/|
\.cdk\.staging/|
cdk\.out/|
\.pytest_cache/|
build/|
dist/
)
# Isort: Import sorting - ensures consistent import ordering
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
- id: isort
args: [
--profile=black,
--line-length=120,
--skip-glob=**/__pycache__,
--skip-glob=.venv,
--skip-glob=venv,
--skip-glob=cdk.out,
--skip-glob=.cdk.staging
]
# Flake8: Python linting - catches style and syntax errors
- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8
args:
- --max-line-length=120
- --extend-ignore=E203,W503
- --exclude=.git,__pycache__,.venv,venv,.cdk.staging,cdk.out,build,dist,.pytest_cache,docs,*.egg-info
additional_dependencies:
- flake8-bugbear