-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy path.pre-commit-config.yaml
47 lines (47 loc) · 1.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
---
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: CHANGELOG.md
- id: check-docstring-first
- id: check-json
- id: check-yaml
- id: requirements-txt-fixer
- id: fix-encoding-pragma
args: [--remove]
- id: pretty-format-json
args: [--autofix, --indent, '4', --no-sort-keys]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
exclude: ^docs/source/conf.py$
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.9.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: local
hooks:
- id: patch-enforce-autospec
name: mock.patch enforce autospec
description: |
This hook ensures all mock.patch invocations specify an autospec
entry: contrib/mock_patch_checker.py
language: script
files: ^tests/.*\.py$
- repo: http://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
args: [--target-version, py38]