-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
62 lines (57 loc) · 1.73 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
# SPDX-FileCopyrightText: Magenta ApS
#
# SPDX-License-Identifier: MPL-2.0
---
repos:
- repo: https://github.com/psf/black
rev: 22.6.0
hooks:
- id: black
args:
# Preview is needed to get automatic string-breaking
- '--preview'
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.3.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/PyCQA/pylint
rev: v2.15.0
hooks:
- id: pylint
additional_dependencies:
# - "pylint-pytest"
- "pylint-pydantic"
args:
# Load our plugins
# - '--load-plugins=pylint_pytest'
- '--load-plugins=pylint_pydantic'
# Ignore 'import-error' and 'no-name-in-module'
# As we do not want to install all dependencies under pre-commit
- '--disable=E0401'
- '--disable=E0611'
# Ignore 'wrong-import-order'
# reorder-python-imports decides the order, if pylint disagrees ¯\_(ツ)_/¯
- '--disable=C0411'
# Ignore import related issues in general
- '--ignore-imports=y'
# Ignore 'fixme'
# We allow TODOs in the source code
- '--disable=W0511'
# With 5 or more lines of duplicate code, we should refactor it
- '--min-similarity-lines=5'
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
entry: pflake8
additional_dependencies: [pyproject-flake8]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
hooks:
- id: mypy
language: system
types: [file, python]
- repo: https://github.com/fsfe/reuse-tool
rev: v1.0.0
hooks:
- id: reuse