-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
40 lines (40 loc) · 1.21 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace
- id: detect-private-key
- id: mixed-line-ending
args: [--fix=lf]
- id: requirements-txt-fixer
- id: name-tests-test
args: [--pytest-test-first]
# Causes issues in GitHub Actions runner on main branch, need to figure out a workaround for only when running in that scenario if I want to use it
# - id: no-commit-to-branch
# args: [-b, main]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: remove-crlf
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
# sort imports
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"] # prevent it fighting black
- repo: https://github.com/lk16/detect-missing-init
rev: v0.1.6
hooks:
- id: detect-missing-init
args:
["--create", "--track", "--python-folders", "src/mtg_scanner,tests"]