-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.pre-commit-config.yaml
90 lines (81 loc) · 2.4 KB
/
.pre-commit-config.yaml
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
85
86
87
88
89
90
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
autoupdate_commit_msg: "CI: pre-commit autoupdate"
files: ^(j2lint|tests)/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
#exclude_types: [jinja, text]
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- name: Check and insert license on Python files
id: insert-license
files: .*\.py$
args:
- --license-filepath
- .github/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --no-extra-eol
- name: Check and insert license on Jinja2 files
id: insert-license
files: .*\.j2$
args:
- --license-filepath
- .github/license-short.txt
- --use-current-year
- --allow-past-years
- --fuzzy-match-generates-todo
- --comment-style
- '{#||#}'
- --no-extra-eol
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
name: Check for PEP8 error on Python files
args:
- --config=/dev/null
- --max-line-length=160
types: [python]
- repo: https://github.com/pycqa/pylint
rev: v3.3.3
hooks:
- id: pylint # Use pylintrc file in repository
name: Check for Linting error on Python files
description: This hook runs pylint.
types: [python]
args:
# Suppress duplicate code for modules header
- -d duplicate-code
additional_dependencies:
- jinja2
- rich
exclude: ^tests/
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: Check for changes when running isort on all python files
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
name: Check for changes when running Black on all python files
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
args:
- --config-file=pyproject.toml
# additional_dependencies:
# Do not run on test
files: ^(j2lint)/