add pre-commit (#6156)

Signed-off-by: Ye Sijun <junnplus@gmail.com>
This commit is contained in:
Jun
2023-07-10 17:21:03 +09:00
committed by GitHub
parent 5af8764c10
commit 24fe1dd121
3 changed files with 29 additions and 0 deletions

10
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
language_version: python3

18
pyproject.toml Normal file
View File

@@ -0,0 +1,18 @@
[project]
requires-python = ">=3.8"
[tool.black]
target-version = ['py38']
line-length = 119
force-exclude = '''
/(
migrations
)/
'''
[tool.isort]
py_version = 38
multi_line_output = 3
include_trailing_comma = true
use_parentheses = true
skip = "migrations"

View File

@@ -6,3 +6,4 @@ ptvsd==4.3.2
freezegun==1.2.1
watchdog==0.9.0
ptpython==3.0.23
pre-commit==3.3.3