Skip to content

Commit c57ff5a

Browse files
committed
ci: add pre-commit hook
1 parent 3c99b80 commit c57ff5a

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

.pre-commit-config.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
default_language_version:
2+
python: python3.8
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.4.0
6+
hooks:
7+
- id: check-added-large-files
8+
- id: check-case-conflict
9+
- id: check-merge-conflict
10+
- id: check-symlinks
11+
- id: mixed-line-ending
12+
- id: trailing-whitespace
13+
files: \.py$
14+
- repo: https://github.com/pycqa/isort
15+
rev: 5.11.5
16+
hooks:
17+
- id: isort
18+
- repo: https://github.com/psf/black
19+
rev: 23.1.0
20+
hooks:
21+
- id: black
22+
ci:
23+
autoupdate_schedule: quarterly

pyproject.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[tool.isort]
2+
profile = "black"

requirements-dev.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
pylint~=2.16.2
2-
black~=23.1.0
2+
black~=23.1.0
3+
isort~=5.12.0
4+
precommit~=3.1.0

0 commit comments

Comments
 (0)