-
Notifications
You must be signed in to change notification settings - Fork 60
/
.pre-commit-config.yaml
45 lines (44 loc) · 1.42 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
repos:
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
types: [file]
files: \.(py|anod|plan)$
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-comprehensions
# - flake8-docstrings
# - flake8-rst-docstrings
- repo: https://github.com/ambv/black
rev: 24.2.0
hooks:
- id: black
types_or: [file]
files: \.(py|plan)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
files: '\.py$'
args:
# These flags make mypy associate different module names to `test.py`
# files from different test directories.
- --explicit-package-bases
- --namespace-packages
additional_dependencies:
- pytest-lsp
- e3-testsuite
- psutil
- types-psutil
- repo: local
hooks:
# This hook checks that Python test directories are valid module names so
# that mypy will accept to analyse multiple test.py in different
# directories.
- id: py-filenames
name: Python test.py paths
entry: Python path components should be valid modules names (e.g. no '.' or whitespace). This is for mypy to accept dealing with test.py files in different directories.
language: fail
files: 'testsuite.*[^A-Za-z0-9_\/].*test\.py$'