-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
89 lines (80 loc) · 2.44 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
# Pre-commit framework Configuration
# See https://pre-commit.com for more information
default_language_version:
python: python3.11
exclude: "python3/14_Code_Quality/python_2to3_ex.py|python3/01_Introduction/|python3/14_Code_Quality/00_static_code_analyses/"
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
exclude: python3/14_Code_Quality/python_2to3_ex.py
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-vcs-permalinks
- id: check-json
- id: check-symlinks
- id: check-toml
- id: check-xml
# - id: check-yaml
# args: [--allow-multiple-documents]
- id: debug-statements
exclude: |
(?x)(
^python3/05_Debugging/ |
^python3/14_Code_Quality/python_2to3_ex.py
)
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
#- id: check-shebang-scripts-are-executable
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: [--profile=black] # , --check-only
description: Sort Python imports
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
hooks:
- id: prettier
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
language_version: python3
args: [--check]
- id: black-jupyter
language_version: python3
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.23.2 # checks for Github Actions CI config files
hooks:
- id: check-github-actions
- id: check-github-workflows
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.4.1
# hooks:
# - id: mypy
# files: ^01_static_typing/
# - repo: https://github.com/pypa/pip-audit
# rev: v2.6.0
# hooks:
# - id: pip-audit
# # args: ["-r", "requirements.txt"]
# - repo: https://github.com/PyCQA/bandit
# rev: 1.7.5
# hooks:
# - id: bandit
# args: ["-ll"]
# files: .py$