forked from Yelp/paasta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
74 lines (74 loc) · 2.37 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
---
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: CHANGELOG.md
- id: check-docstring-first
- id: check-json
- id: check-yaml
exclude: /template/
- id: debug-statements
- id: name-tests-test
args: [--django]
- id: requirements-txt-fixer
- id: fix-encoding-pragma
args: [--remove]
exclude: ^paasta_tools/paastaapi
- id: pretty-format-json
args: [
'--autofix',
'--indent', '4',
'--no-sort-keys',
]
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.4.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
additional_dependencies: [aspy.refactor_imports==0.5.3]
exclude: ^paasta_tools/paastaapi
- repo: https://github.com/asottile/pyupgrade
rev: v1.12.0
hooks:
- id: pyupgrade
args: [--py36-plus]
exclude: ^paasta_tools/paastaapi
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: ['--target-version', 'py38']
exclude: ^paasta_tools/paastaapi
- repo: https://github.com/PyCQA/flake8
rev: 3.7.7
hooks:
- id: flake8
args: ['--ignore', 'E231']
exclude: ^docs/source/conf.py|paasta_tools/paastaapi.*$
- repo: https://github.com/Yelp/detect-secrets
rev: 0.9.1
hooks:
- id: detect-secrets
args: ['--baseline', '.secrets.baseline']
exclude: .*tests/.*|.*yelp/testing/.*|\.pre-commit-config\.yaml
- repo: local
hooks:
- id: patch-enforce-autospec
name: mock.patch enforce autospec
description: This hook ensures all mock.patch invocations specify an autospec
entry: paasta_tools/contrib/mock_patch_checker.py
language: script
files: ^tests/.*\.py$|^.*_itests/.*\.py
- id: check-oapi-schema
name: check that oapi.yaml is updated if paastaapi changes
description: paastaapi is autogenerated with make openapi-codegen
entry: paasta_tools/contrib/check_manual_oapi_changes.sh
language: script
exclude: ^$
# we just want to run this hook once, so only include a single file
files: ^paasta_tools/api/api_docs/oapi.yaml