ci: integrate black and pre-commit for formatting codes

This commit is contained in:
100gle
2023-06-09 12:56:05 +08:00
parent 42223cedbb
commit aefcbee8e8
3 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
language: python

View File

@@ -57,3 +57,7 @@ target-version = "py310"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.black]
line-length = 88
target-version = ['py310', 'py311']

View File

@@ -1,2 +1,4 @@
-r requirements.txt
ruff
ruff
black
pre-commit