mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-04-04 19:19:29 +08:00
ci: integrate black and pre-commit for formatting codes
This commit is contained in:
6
backend/.pre-commit-config.yaml
Normal file
6
backend/.pre-commit-config.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 22.10.0
|
||||
hooks:
|
||||
- id: black
|
||||
language: python
|
||||
@@ -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']
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
-r requirements.txt
|
||||
ruff
|
||||
ruff
|
||||
black
|
||||
pre-commit
|
||||
Reference in New Issue
Block a user