mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-16 12:30:11 +01:00
improve ruff config
This commit is contained in:
parent
0e404b5ee3
commit
62712dcad3
@ -87,14 +87,15 @@ features = [
|
|||||||
[tool.hatch.envs.default.scripts]
|
[tool.hatch.envs.default.scripts]
|
||||||
dev = "python main.py {args}"
|
dev = "python main.py {args}"
|
||||||
lint = [
|
lint = [
|
||||||
"flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics",
|
# "flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics",
|
||||||
"flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics",
|
# "flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics",
|
||||||
# "ruff libretranslate scripts --fix",
|
"ruff libretranslate scripts",
|
||||||
]
|
]
|
||||||
fmt = [
|
fmt = [
|
||||||
"ruff libretranslate scripts --fix",
|
"ruff libretranslate scripts --fix",
|
||||||
]
|
]
|
||||||
test = [
|
test = [
|
||||||
|
# "fmt",
|
||||||
"pytest {args}",
|
"pytest {args}",
|
||||||
]
|
]
|
||||||
cov = [
|
cov = [
|
||||||
@ -135,19 +136,19 @@ select = [
|
|||||||
"A", # flake8-builtins
|
"A", # flake8-builtins
|
||||||
"YTT", # flake8-2020
|
"YTT", # flake8-2020
|
||||||
"B", # flake8-bugbear
|
"B", # flake8-bugbear
|
||||||
"C", # flake8-comprehensions
|
# "C", # flake8-comprehensions
|
||||||
"ICN", # flake8-import-conventions
|
"ICN", # flake8-import-conventions
|
||||||
"SIM", # flake8-simplify
|
"SIM", # flake8-simplify
|
||||||
"TID", # flake8-tidy-imports
|
"TID", # flake8-tidy-imports
|
||||||
"Q", # flake8-quotes
|
# "Q", # flake8-quotes
|
||||||
"FBT", # flake8-boolean-trap
|
"FBT", # flake8-boolean-trap
|
||||||
"F", # pyflakes
|
"F", # pyflakes
|
||||||
"UP", # pyupgrade
|
"UP", # pyupgrade
|
||||||
"E", # pycodestyle errors
|
# "E", # pycodestyle errors
|
||||||
"W", # pycodestyle warnings
|
# "W", # pycodestyle warnings
|
||||||
"PLC", # pylint convention
|
"PLC", # pylint convention
|
||||||
"PLE", # pylint error
|
"PLE", # pylint error
|
||||||
"PLR", # pylint refactor
|
# "PLR", # pylint refactor
|
||||||
"PLW", # pylint warning
|
"PLW", # pylint warning
|
||||||
"RUF", # ruff specific
|
"RUF", # ruff specific
|
||||||
"T",
|
"T",
|
||||||
|
Loading…
Reference in New Issue
Block a user