Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit ca53f34

Browse files
Create pre-commits
1 parent 69da929 commit ca53f34

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.pre-commit-config.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
repos:
2+
- repo: https://github.com/asottile/yesqa # Remove extraneous QA comments
3+
rev: v1.5.0
4+
hooks:
5+
- id: yesqa
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v4.4.0
8+
hooks:
9+
- id: check-yaml # Check YAML files for syntax errors
10+
- id: debug-statements # Check for debugger imports and py37+ breakpoint()
11+
- id: end-of-file-fixer # Ensure files end in a newline
12+
- id: trailing-whitespace # Trailing whitespace checker
13+
- repo: https://github.com/asottile/reorder-python-imports # Reorder imports
14+
rev: v3.10.0
15+
hooks:
16+
- id: reorder-python-imports
17+
- repo: https://github.com/asottile/pyupgrade # Upgrade Python syntax
18+
rev: v3.7.0
19+
hooks:
20+
- id: pyupgrade
21+
- repo: https://github.com/psf/black # Format Python code
22+
rev: 23.3.0
23+
hooks:
24+
- id: black
25+
args: [--line-length=120]
26+
- repo: https://github.com/astral-sh/ruff-pre-commit
27+
rev: v0.0.275
28+
hooks:
29+
- id: ruff
30+
args: [--line-length=120, '--ignore=E203', --fix, --exit-non-zero-on-fix]
31+
- repo: https://github.com/pycqa/bandit # Check code for common security issues
32+
rev: 1.7.5
33+
hooks:
34+
- id: bandit
35+
args:
36+
- -s
37+
- B101
38+
- repo: https://github.com/PyCQA/docformatter # Format docstrings
39+
rev: v1.7.3
40+
hooks:
41+
- id: docformatter
42+
args:
43+
- -s numpy
44+
- --black
45+
- --in-place

0 commit comments

Comments
 (0)