mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🔨 添加ruff
的pre-commit
This commit is contained in:
parent
ec3fe28cc5
commit
e4f83b92c4
@ -38,3 +38,7 @@ repos:
|
|||||||
# - id: poetry-export
|
# - id: poetry-export
|
||||||
# args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements.txt"]
|
# args: ["-f", "requirements.txt", "--without-hashes", "-o", "requirements.txt"]
|
||||||
# verbose: true
|
# verbose: true
|
||||||
|
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||||
|
rev: 'v0.0.245'
|
||||||
|
hooks:
|
||||||
|
- id: ruff
|
||||||
|
@ -35,4 +35,3 @@ async def websocket_endpoint(websocket: WebSocket, bot_id: str):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
uvicorn.run(app, host=HOST, port=PORT)
|
uvicorn.run(app, host=HOST, port=PORT)
|
||||||
uvicorn.run(app, host=HOST, port=PORT)
|
|
||||||
|
@ -21,6 +21,7 @@ black = "^22.12.0"
|
|||||||
isort = "^5.11.4"
|
isort = "^5.11.4"
|
||||||
pre-commit = "^2.21.0"
|
pre-commit = "^2.21.0"
|
||||||
pycln = "^2.1.2"
|
pycln = "^2.1.2"
|
||||||
|
ruff = "^0.0.245"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core"]
|
requires = ["poetry-core"]
|
||||||
@ -34,6 +35,10 @@ skip-string-normalization = true
|
|||||||
extend-exclude = '''
|
extend-exclude = '''
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
[tool.ruff]
|
||||||
|
line-length = 79
|
||||||
|
target-version = "py310"
|
||||||
|
|
||||||
[tool.isort]
|
[tool.isort]
|
||||||
profile = "black"
|
profile = "black"
|
||||||
line_length = 79
|
line_length = 79
|
||||||
|
Loading…
x
Reference in New Issue
Block a user