-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
98 lines (88 loc) · 2.71 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
91
92
93
94
95
96
97
98
---
default_stages: [commit]
default_language_version:
python: python3
exclude: "examples/.*$"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-byte-order-marker
- id: check-executables-have-shebangs
# Need to define stages explicitly since `default_stages` was not being respected
stages: [commit]
- id: check-merge-conflict
- id: debug-statements
- id: detect-aws-credentials
args: [ --allow-missing-credentials ]
- id: detect-private-key
- id: end-of-file-fixer
exclude: |
(?x)^(
.circleci/config.yml
)$
# Need to define stages explicitly since `default_stages` was not being respected
stages: [ commit ]
- id: forbid-new-submodules
- id: no-commit-to-branch
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# Need to define stages explicitly since `default_stages` was not being respected
stages: [commit]
- repo: local
hooks:
- id: codespell
name: Spell-check Python files (codespell)
entry: codespell
language: python
types: [file, python]
additional_dependencies: [codespell==2.0.0]
- id: isort
name: Sort Python imports (isort)
entry: isort
language: python
types: [file, python]
additional_dependencies: [isort>=5.10.1]
- id: black
name: Format Python (black)
entry: black
language: python
types: [file, python]
additional_dependencies: [black>=22.3.0]
# - id: mypy
# name: Type check Python (mypy)
# entry: mypy -p py2sfn_task_tools
# language: python
# types: [file, python]
# pass_filenames: false
# additional_dependencies: [mypy>=0.960]
- id: flake8
name: Lint Python (flake8)
entry: flake8 --config .flake8
language: python
types: [file, python]
additional_dependencies:
- flake8>=3.9.2
- flake8-import-order
- flake8-print
# - id: pydocstyle
# name: Lint Python docstrings (pydocstyle)
# entry: pydocstyle
# language: python
# types: [file, python]
# additional_dependencies:
# - pydocstyle>=6.1.1
# - pydocstyle[toml]
# exclude: >
# (?x)^(
# .*__init__.py$|
# .*setup.py$|
# )$
- id: circleci-config
name: Pack the CircleCI config
entry: .githooks/pre-commit-scripts/circleci.sh
language: script
files: '^\.circleci/'
pass_filenames: false