Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (76 loc) · 2.86 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
76 lines (76 loc) · 2.86 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
name: Check for added large files
- id: check-ast
name: Check Python files for parse errors
- id: check-case-conflict
name: Check files for case conflicts on case-insensitive filesystems
- id: check-docstring-first
name: Check that no code is placed prior to docstrings
- id: check-merge-conflict
name: Check for files that contain merge conflict strings
- id: check-toml
name: Check valid TOML syntax
- id: check-yaml
name: Check valid YAML syntax
- id: end-of-file-fixer
name: Check for newline at end of file
exclude: "^LICENSE$"
- id: debug-statements
name: Check for debugger imports
- id: trailing-whitespace
name: Check for trailing whitespaces
- repo: https://github.com/PyCQA/bandit
rev: 1.9.4
hooks:
- id: bandit
name: Run bandit (security linter for python)
args: ["-c", "pyproject.toml", "-r", "-ll", "src/fourc_webviewer/", "tests/"]
additional_dependencies: ["bandit[toml]"]
- repo: https://github.com/PyCQA/docformatter
rev: "eb1df347edd128b30cd3368dddc3aa65edcfac38" # change back to version once bug is fixed in latest version to be compatible with pre-commit
hooks:
- id: docformatter
name: Run docformatter (formatter for docstrings)
args: ["--in-place", "--config=./pyproject.toml", "-r", "src/fourc_webviewer/", "tests/"]
- repo: https://github.com/econchick/interrogate
rev: 1.7.0
hooks:
- id: interrogate
name: Run interrogate (linter for docstrings)
args: [--fail-under=100, --ignore-init-module, --style=google, -vv]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.3.1
hooks:
- id: mypy
name: Run mypy (static type checker for python)
args: ["--install-types", "--non-interactive", "--ignore-missing-imports", "--follow-imports=silent"]
- repo: https://github.com/asmeurer/removestar
rev: "1.5.2"
hooks:
- id: removestar
name: Run removestar (remove wildcard imports)
additional_dependencies:
- pyflakes<4
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.8
hooks:
- id: ruff # linter
name: Run ruff (linter for Python)
args: ["--fix", "--select", "I,TID252"] # "I => sort imports, TID252 => ban relative imports
- id: ruff-format # formatter
name: Run ruff (formatter for Python)
- repo: https://github.com/crate-ci/typos
rev: v1.50.2
hooks:
- id: typos
name: Run typo checker
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
name: Run yamlfmt
args: ["-formatter", "retain_line_breaks_single=true"]