-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.pre-commit-config.yaml
48 lines (48 loc) · 1.48 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
# Configuration for pre-commit hooks, see: https://pre-commit.com/
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
args: ["--maxkb=1024"]
# 1 MB - Don't commit notebooks with output!
- id: trailing-whitespace
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
- id: detect-private-key
- repo: https://github.com/psf/black
# docs: https://black.readthedocs.io/en/stable/integrations/source_version_control.html
rev: "23.3.0"
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.260"
hooks:
- id: ruff
- repo: https://github.com/pre-commit/mirrors-mypy
# NOTE: This passes ALL files to `mypy`. mypy will cache these.
# However, we must ignore all missing imports, because pre-commit runs in a separate env
rev: "v1.1.1"
hooks:
- id: mypy
pass_filenames: false
args:
[
--config-file,
pyproject.toml,
--ignore-missing-imports,
--install-types,
--non-interactive,
]
# SEE: https://pre-commit.com/#repository-local-hooks
# - repo: local
# hooks:
# - id: foo
# name: foo
# entry: foo
# language: system
# description: "Example local hook, see https://pre-commit.com/#repository-local-hooks"