-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
79 lines (71 loc) · 2.33 KB
/
.pre-commit-config.yaml
File metadata and controls
79 lines (71 loc) · 2.33 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
# Pre-commit hooks configuration for YuhHearDem3
# See https://pre-commit.com for more information
default_language_version:
python: python3.12
repos:
# General pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# File format checks
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-json
- id: check-added-large-files
args: [--maxkb=1000]
exclude: ^tests/fixtures/
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
# Python-specific checks
- id: check-ast
- id: check-docstring-first
- id: debug-statements
- id: check-builtin-literals
- id: name-tests-test
args: [--pytest-test-first]
# Ruff - Fast Python linter and formatter (replaces flake8, pylint, black, isort)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
# Run the linter
- id: ruff
types: [python]
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter (replaces black)
- id: ruff-format
types: [python]
# mypy - Static type checking (disabled - many pre-existing type issues)
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.13.0
# hooks:
# - id: mypy
# additional_dependencies:
# - types-beautifulsoup4
# - types-lxml
# - types-PyYAML
# args: [--ignore-missing-imports, --no-strict-optional]
# exclude: (^tests/|/tests/)
# pyupgrade - Automatically upgrade syntax for newer Python versions
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py312-plus]
# bandit - Security linter (skipped - many false positives for this codebase)
# - repo: https://github.com/PyCQA/bandit
# rev: 1.7.10
# hooks:
# - id: bandit
# args: [-c, pyproject.toml, "-x", "tests/"]
# additional_dependencies: ["bandit[toml]"]
# markdownlint - Markdown linter (skipped - many pre-existing formatting issues)
# - repo: https://github.com/igorshubovych/markdownlint-cli
# rev: v0.43.0
# hooks:
# - id: markdownlint
# args: [--fix]