forked from eegdash/EEGDash
-
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 (69 loc) · 2.78 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
70 lines (69 loc) · 2.78 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
default_language_version:
python: python3
ci:
autofix_commit_msg: '[pre-commit.ci] auto fixes from pre-commit.com hooks'
autofix_prs: true
autoupdate_branch: master
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: weekly
skip: []
submodules: false
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff
name: ruff lint & format
args:
- --fix
- --show-fixes
# Selects all rules from your original config (E,W,F,I,D) and enables import sorting (I)
# and unused import removal (F401 is part of 'F' and is no longer ignored).
- --select=E,W,F,D,I,NPY201
- --ignore=E402,E501,D100,D101,D102,D103,D104,D105,D107,D205,D400,D415,D417,F403,D401,E741,E722,D419
files: ^(eegdash|docs|notebooks|scripts|tests)/
exclude: (\.ipynb$)
- id: ruff
name: ruff examples
args:
- --fix
- --show-fixes
# Selects all rules from your original config (E,W,F,I,D) and enables import sorting (I)
# and unused import removal (F401 is part of 'F' and is no longer ignored).
- --select=E,W,F,D,NPY201
- --ignore=I,E402,E501,D100,D101,D102,D103,D104,D105,D107,D205,D400,D415,D417,F403,D401,E741,E722,D419
files: ^(examples)/
- id: ruff-format
name: ruff format code
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args:
- --ignore-words-list=carin,splitted,meaned,wil,whats,additionals,alle,alot,bund,currenty,datas,farenheit,falsy,fo,haa,hass,iif,incomfort,ines,ist,nam,nd,pres,pullrequests,resset,rime,ser,serie,te,technik,ue,unsecure,withing,zar,mane,THIRDPARTY,sentance,mapp,unparseable,hart,nce,daa,ot,disjointness,varience,archiv,trough,bui,youn,groth,raison
- --skip=./.*,*.csv,*.json,*.ambr,*.toml,docs/source/_static/lib/*
- --quiet-level=2
exclude_types:
- csv
- json
- svg
- repo: https://github.com/asottile/blacken-docs
rev: 1.20.0
hooks:
- id: blacken-docs
exclude: ^.github|CONTRIBUTING.md|README.md|docs/|examples/|notebooks/|scripts/|tests/
- repo: local
hooks:
- id: no-nested-functions
name: Check for nested function definitions
entry: python scripts/check_nested_functions.py
language: python
types: [python]
files: ^(eegdash|docs|scripts)/
exclude: (\.ipynb$|docs/source/generated/|docs/_build/|docs/source/conf\.py)
- id: find-leaked-creds
name: Block leaked credentials in staged changes
entry: bash scripts/ingestions/scripts/find_leaked_creds.sh
language: system
pass_filenames: false
stages: [pre-commit]