mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2025-05-31 20:02:20 +00:00
Add pre-commit to automatically run formatting when committing
This commit is contained in:
parent
7d07967574
commit
25168ba6e1
14 changed files with 74 additions and 34 deletions
|
@ -65,7 +65,7 @@ ltmanage = "libretranslate.manage:manage"
|
|||
test = [
|
||||
"pytest >=7.2.0",
|
||||
"pytest-cov",
|
||||
"ruff ==0.0.277",
|
||||
"pre-commit >=3.0.0",
|
||||
"types-requests",
|
||||
]
|
||||
|
||||
|
@ -83,13 +83,16 @@ History = "https://github.com/LibreTranslate/LibreTranslate/releases"
|
|||
features = [
|
||||
"test",
|
||||
]
|
||||
post-install-commands = [
|
||||
"pre-commit install",
|
||||
]
|
||||
|
||||
|
||||
[tool.hatch.envs.default.scripts]
|
||||
dev = "python main.py {args}"
|
||||
locales = "python scripts/compile_locales.py"
|
||||
fmt = [
|
||||
"ruff libretranslate scripts --fix",
|
||||
"pre-commit run --all --all-files",
|
||||
]
|
||||
test = [
|
||||
"fmt",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue