1- # See https://pre-commit.com for more information
2- # See https://pre-commit.com/hooks.html for more hooks
1+ ci :
2+ autofix_commit_msg : " chore(pre-commit): autofix run"
3+ autoupdate_commit_msg : " chore(pre-commit): autoupdate hooks"
4+
5+ default_install_hook_types :
6+ - pre-commit
7+ - commit-msg
8+ - post-checkout
9+ - post-merge
10+
311repos :
4- - repo : https://github.com/pre-commit/pre-commit-hooks
5- rev : v3.2.0
6- hooks :
7- - id : trailing-whitespace
8- - id : end-of-file-fixer
9- - repo : local
10- hooks :
11- - id : black
12- name : black
13- entry : bash -c 'poetry run black .'
14- require_serial : true
15- language : system
16- types : [python]
17- pass_filenames : false
18- files : ^src/clearskies/
19- - id : pytest
20- name : pytest
21- entry : bash -c 'cd src && poetry run pytest'
22- require_serial : true
23- language : system
24- types : [python]
25- pass_filenames : false
12+ - repo : https://github.com/pre-commit/pre-commit-hooks
13+ rev : v5.0.0
14+ hooks :
15+ - id : check-added-large-files
16+ - id : check-ast
17+ - id : check-builtin-literals
18+ - id : check-case-conflict
19+ - id : check-docstring-first
20+ - id : check-json
21+ - id : check-merge-conflict
22+ - id : check-shebang-scripts-are-executable
23+ - id : check-symlinks
24+ - id : check-toml
25+ - id : check-vcs-permalinks
26+ - id : check-xml
27+ - id : check-yaml
28+ exclude : (.gitlab-ci.yml|mkdocs.yml)
29+ - id : debug-statements
30+ - id : destroyed-symlinks
31+ - id : detect-private-key
32+ - id : end-of-file-fixer
33+ types : [python]
34+ - id : fix-byte-order-marker
35+ - id : mixed-line-ending
36+ - id : name-tests-test
37+ args : [--pytest-test-first]
38+ stages : ["pre-commit"]
39+ - id : trailing-whitespace
40+ types : [python]
41+ - repo : https://github.com/python-poetry/poetry
42+ rev : 2.1.3 # add version here
43+ hooks :
44+ - id : poetry-check
45+ - id : poetry-lock
46+ - id : poetry-install
47+ - repo : https://github.com/pre-commit/mirrors-mypy
48+ rev : v1.16.1 # Use the sha / tag you want to point at
49+ hooks :
50+ - id : mypy
51+ types : [python]
52+ additional_dependencies : [types-requests]
53+ stages : ["pre-commit"]
54+ - repo : https://github.com/astral-sh/ruff-pre-commit
55+ # Ruff version.
56+ rev : v0.12.0
57+ hooks :
58+ # Run the linter.
59+ - id : ruff-check
60+ stages : ["pre-commit"]
61+ args :
62+ - --diff
63+ # Run the formatter.
64+ - id : ruff-format
65+ stages : ["pre-commit"]
66+ args :
67+ - --diff --check
68+ - repo : local
69+ hooks :
70+ - id : pytest
71+ name : pytest
72+ entry : bash -c 'cd src && poetry run pytest'
73+ language : system
74+ types : [python]
75+ pass_filenames : false
76+ always_run : true
77+ stages : ["pre-commit"]
78+
0 commit comments