-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
83 lines (83 loc) · 2.29 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
---
repos:
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear==23.2.13"]
- repo: https://github.com/myint/autoflake
rev: v2.0.1
hooks:
- id: autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-all-unused-imports
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args:
- --keep-percent-format
- --py38-plus
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-no-eval
- id: python-no-log-warn
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
entry: bandit
language: python
language_version: python3
types: [python]
args:
# Make no sense that using assert is security issue.
- --skip=B101
- repo: https://github.com/adrienverge/yamllint
rev: v1.29.0
hooks:
- id: yamllint
entry: yamllint
language: python
types: [file, yaml]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-ast
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-json
- id: check-xml
- id: check-yaml
- id: check-case-conflict
- id: check-merge-conflict
# exclude files where underlines are not distinguishable from merge
# conflicts
exclude: /README\.rst$|^docs/.*\.rst$
- id: check-symlinks
- id: debug-statements
# Fixers
- id: end-of-file-fixer
- id: fix-byte-order-marker
# To remove utf-8 encoding (and the like) in python files.
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args:
- --config=.python-black