Skip to content

Commit 842151d

Browse files
committed
add pre-commit for check code at commit
1 parent 097f7a3 commit 842151d

File tree

3 files changed

+163
-1
lines changed

3 files changed

+163
-1
lines changed

.pre-commit-config.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
fail_fast: true
2+
default_language_version:
3+
python: python3.8
4+
default_stages: [commit, push]
5+
repos:
6+
- repo: local
7+
hooks:
8+
- id: system
9+
name: isort
10+
entry: poetry run isort .
11+
pass_filenames: false
12+
language: system
13+
- repo: local
14+
hooks:
15+
- id: system
16+
name: Black
17+
entry: poetry run black .
18+
pass_filenames: false
19+
language: system
20+
- repo: local
21+
hooks:
22+
- id: system
23+
name: Flake8
24+
entry: poetry run flake8 .
25+
pass_filenames: false
26+
language: system
27+
- repo: local
28+
hooks:
29+
- id: system
30+
name: MyPy
31+
entry: poetry run mypy .
32+
pass_filenames: false
33+
language: system
34+
- repo: local
35+
hooks:
36+
- id: system
37+
name: eslint
38+
entry: npm run lint
39+
pass_filenames: false
40+
language: system

poetry.lock

Lines changed: 122 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ pytest-regressions = "*"
7777
pytest-html = "^3.1.1"
7878
GitPython = "^3.1.27"
7979
semantic-version = "^2.9.0"
80+
pre-commit = "^2.17.0"
8081

8182

8283
[tool.poetry-dynamic-versioning]

0 commit comments

Comments
 (0)