-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
70 lines (63 loc) · 1.83 KB
/
.pre-commit-config.yaml
File metadata and controls
70 lines (63 loc) · 1.83 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
repos:
# pre-commit hooks for generally useful checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-json
exclude: .vscode
- id: check-yaml
- id: check-toml
- id: detect-private-key
- id: debug-statements
- id: end-of-file-fixer
- id: name-tests-test
- id: pretty-format-json
- id: requirements-txt-fixer
- id: trailing-whitespace
# flake8 - linting
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
# code formatter to keep consistent
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
args: [--safe]
# isort - sorting imports
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
# mypy - lint-like type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.0.1
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
additional_dependencies: [types-pyyaml==6.0.1]
# update syntax to latest python style
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
# Check Markdown documents with Markdownlint(Node.js variant)
# https://github.com/DavidAnson/markdownlint
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
hooks:
- id: markdownlint
# run pytest
- repo: local
hooks:
- id: pytest-check
name: pytest-check
entry: pytest
language: system
pass_filenames: false
always_run: true