Skip to content

Commit

Permalink
add pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
leng-yue committed Dec 15, 2022
1 parent 901d14a commit 7848418
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:
# Pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
# Black
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
# ISort
- repo: https://github.com/timothycrosley/isort
rev: 5.11.2
hooks:
- id: isort
args: [--profile=black]
153 changes: 152 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ black = "^22.12.0"
isort = "^5.10.1"
pytest = "^7.2.0"
pytest-coverage = "^0.0"
pre-commit = "^2.20.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit 7848418

Please sign in to comment.