-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
43 lines (41 loc) · 1.71 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
# https://pre-commit.com/index.html#top_level-default_stages
default_stages: [commit] # All hooks that do not specify any stages are set to `commit` by default
repos:
# Generic Hooks: https://pre-commit.com/hooks.html
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed.
args: ['--maxkb=9000'] # default 500kb
- id: check-ast # Simply check whether files parse as valid python.
- id: check-json # Attempts to load all json files to verify syntax.
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: trailing-whitespace # Trims trailing whitespace.
exclude: '\.manifest$'
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
exclude: '\.manifest$'
- id: mixed-line-ending
args: [--fix=lf] # single control character (\n, ASCII code 10), most universal
exclude: '\.manifest$'
- id: requirements-txt-fixer # Sorts entries in requirements.txt
- id: check-case-conflict # Check for files with names that would conflict on a case-insensitive filesystem
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py312-plus]
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.7
hooks:
- id: nbqa-isort
args: ["--profile=black"] # "--float-to-top",
- id: nbqa-flake8
args: ["--extend-ignore=E501,E402"]
- id: nbqa-black
- id: nbqa-pyupgrade
args: ["--py312-plus"]
# - id: nbqa-pylint # too many complaints
# - id: nbqa-mypy # too many complaints