-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
44 lines (39 loc) · 1.33 KB
/
.pre-commit-config.yaml
File metadata and controls
44 lines (39 loc) · 1.33 KB
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
repos:
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3.11 # require Python 3.11 or newer
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.0
hooks:
- id: ruff
args: [--fix, --extend-ignore, E402] # ruff will auto-fix many issues
additional_dependencies: []
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1 # pick a valid tag you confirmed with git ls-remote
hooks:
- id: mypy
# keep commonly useful flags, then selectively disable error codes reported by mypy
args:
- --ignore-missing-imports
- --disable-error-code=import-untyped
- --disable-error-code=call-arg
- --disable-error-code=union-attr
- --disable-error-code=arg-type
- --disable-error-code=used-before-def
- --disable-error-code=attr-defined
files: \.py$
language_version: python3.11