-
Notifications
You must be signed in to change notification settings - Fork 39
/
.pre-commit-config.yaml
83 lines (73 loc) · 2.23 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
---
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args:
- --strict
- repo: https://github.com/python-poetry/poetry
rev: 1.8.3
hooks:
# Equivalent to running `poetry check --lock`.
# This checks that:
# 1. the Poetry content of the `pyproject.toml` file is valid;
# 2. there is a `poetry.lock` file;
# 3. the content of `poetry.lock` is in sync with the content of `pyproject.toml`.
- id: poetry-check
args:
- --lock
# Equivalent to running `poetry lock --no-update`.
# This syncs the `poetry.lock` file with the content of the `pyproject.toml` file.
# This hook fails if it results in modifying `poetry.lock`.
- id: poetry-lock
args:
- --no-update
# Equivalent to running `poetry export`.
# This exports the `poetry.lock` file to the `requirements.txt` file.
# This hook fails if it results in modifying `requirements.txt`.
- repo: https://github.com/python-poetry/poetry-plugin-export
rev: 1.8.0
hooks:
- id: poetry-export
- repo: https://github.com/myint/autoflake
rev: v1.6.0
hooks:
- id: autoflake
name: Autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-duplicate-keys
- --ignore-pass-after-docstring
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
name: Black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-merge-conflict
# exclude files where underlines are not distinguishable from merge conflicts
exclude: /README\.rst$|^docs/.*\.rst$
- id: check-symlinks
- id: check-xml
- id: check-yaml
exclude: ^.drone\.yml|meta.yaml
- id: mixed-line-ending
args: ["--fix=lf"]
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
name: Flake8
exclude: (ui/|test/)