-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
52 lines (52 loc) · 1.67 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
# Configuration for pre-commit hooks, see: https://pre-commit.com/
default_language_version:
python: python3.9
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/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.263"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
hooks:
- id: isort
name: isort (python)
- 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
# consider also black-jupyter
- 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.3.0"
hooks:
- id: mypy
pass_filenames: false
args: [--config-file, pyproject.toml, --ignore-missing-imports]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.7.0
hooks:
- id: markdownlint-cli2
# 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"