This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
95 lines (85 loc) · 2.66 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
---
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.9.3]
- id: black
name: Format Python (black)
entry: black
language: python
types: [file, python]
additional_dependencies: [black==22.3.0]
- id: pydocstyle
name: Lint Python docstrings (pydocstyle)
entry: pydocstyle
language: python
types: [file, python]
additional_dependencies: [pydocstyle==6.1.1]
exclude: >
(?x)^(
.*__init__.py$|
.*setup.py$
)$
- id: flake8
name: Lint Python (flake8)
entry: flake8 --config .flake8
language: python
types: [file, python]
additional_dependencies:
- flake8==3.9.2
- "flake8-import-order<0.19,>=0.18"
- flake8-print>=3.1.4,<4
- id: circleci-config
name: Pack the CircleCI config
entry: .githooks/pre-commit-scripts/circleci.sh
language: script
files: '^\.circleci/'
- id: cruft-check
name: Check project's Cruft (Cruft)
entry: .githooks/pre-commit-scripts/cruft-check.sh
language: python
additional_dependencies: [cruft==2.9.0]
always_run: true
stages: [push]