-
Notifications
You must be signed in to change notification settings - Fork 11
/
.pre-commit-config.yaml
55 lines (55 loc) · 1.79 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
files: ".py$"
exclude: "sphinx-docs/"
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
name: black
description: "Black: The uncompromising Python code formatter"
entry: black
language: python
require_serial: true
types_or: [python, pyi]
args: [--config=code-checks/.black.cfg]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
name: Run isort to sort imports in Python files
files: \.py$|\.pyi$
args: [--settings-path=code-checks/.isort.cfg]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-merge-conflict
name: Check that merge conflicts are not being committed
- id: trailing-whitespace
name: Remove trailing whitespace at end of line
- id: mixed-line-ending
name: Detect if mixed line ending is used (\r vs. \r\n)
- id: end-of-file-fixer
name: Make sure that there is an empty line at the end
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
name: flake8
description: '`flake8` is a command-line utility for enforcing style consistency across Python projects.'
entry: flake8
language: python
types: [python]
require_serial: true
args: [--config=code-checks/.flake8]
- repo: local
hooks:
- id: mypy
name: mypy
description: 'Optional static typing for Python (installed by Poetry)'
entry: mypy
language: python
require_serial: true
types_or: [python, pyi]
args: [--config-file=code-checks/.mypy.ini]