Skip to content

Commit ba9d626

Browse files
committed
🔄 synced local './' with remote 'configs/python/'
1 parent be29648 commit ba9d626

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.pre-commit-config.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: check-yaml # Check YAML files for syntax errors
6+
- id: debug-statements # Check for debugger imports and py37+ breakpoint()
7+
- id: end-of-file-fixer # Ensure files end in a newline
8+
- id: trailing-whitespace # Trailing whitespace checker
9+
- id: check-added-large-files # Check for large files added to git
10+
- id: check-merge-conflict # Check for files that contain merge conflict strings
11+
- repo: https://github.com/pre-commit/pygrep-hooks
12+
rev: v1.10.0 # Use the ref you want to point at
13+
hooks:
14+
- id: python-use-type-annotations # Check for missing type annotations
15+
- id: python-check-blanket-noqa # Check for # noqa: all
16+
- id: python-no-log-warn # Check for log.warn
17+
- repo: https://github.com/pycqa/isort
18+
rev: 5.13.2
19+
hooks:
20+
- id: isort
21+
args:
22+
- -l 120
23+
- --force-single-line-imports
24+
- --profile black
25+
- repo: https://github.com/asottile/pyupgrade # Upgrade Python syntax
26+
rev: v3.15.2
27+
hooks:
28+
- id: pyupgrade
29+
args:
30+
- --py310-plus
31+
- repo: https://github.com/psf/black # Format Python code
32+
rev: 24.4.2
33+
hooks:
34+
- id: black
35+
args:
36+
- --line-length=120
37+
- repo: https://github.com/astral-sh/ruff-pre-commit
38+
rev: v0.4.4
39+
hooks:
40+
- id: ruff
41+
args:
42+
- --line-length=120
43+
- --fix
44+
- --exit-non-zero-on-fix
45+
- --preview
46+
- repo: https://github.com/jshwi/docsig # Check docstrings against function sig
47+
rev: v0.53.2
48+
hooks:
49+
- id: docsig
50+
args:
51+
- --ignore-no-params # Allow docstrings without parameters
52+
- --check-dunders # Check dunder methods
53+
- --check-overridden # Check overridden methods
54+
- --check-protected # Check protected methods
55+
- --check-class # Check class docstrings
56+
- --disable=E113 # Disable empty docstrings

0 commit comments

Comments
 (0)