mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat: replace isort, flake8 & black with ruff
This commit is contained in:
parent
9ccfa34e04
commit
884ec0b5df
@ -35,10 +35,10 @@ dependencies = [
|
|||||||
"accelerate~=0.23.0",
|
"accelerate~=0.23.0",
|
||||||
"albumentations",
|
"albumentations",
|
||||||
"click",
|
"click",
|
||||||
"clip_anytorch", # replacing "clip @ https://github.com/openai/CLIP/archive/eaa22acb90a5876642d0507623e859909230a52d.zip",
|
"clip_anytorch", # replacing "clip @ https://github.com/openai/CLIP/archive/eaa22acb90a5876642d0507623e859909230a52d.zip",
|
||||||
"compel~=2.0.2",
|
"compel~=2.0.2",
|
||||||
"controlnet-aux>=0.0.6",
|
"controlnet-aux>=0.0.6",
|
||||||
"timm==0.6.13", # needed to override timm latest in controlnet_aux, see https://github.com/isl-org/ZoeDepth/issues/26
|
"timm==0.6.13", # needed to override timm latest in controlnet_aux, see https://github.com/isl-org/ZoeDepth/issues/26
|
||||||
"datasets",
|
"datasets",
|
||||||
"diffusers[torch]~=0.23.0",
|
"diffusers[torch]~=0.23.0",
|
||||||
"dnspython~=2.4.0",
|
"dnspython~=2.4.0",
|
||||||
@ -96,10 +96,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
"dev" = ["jurigged", "pudb"]
|
"dev" = ["jurigged", "pudb"]
|
||||||
"test" = [
|
"test" = [
|
||||||
"black",
|
"ruff",
|
||||||
"flake8",
|
|
||||||
"Flake8-pyproject",
|
|
||||||
"isort",
|
|
||||||
"mypy",
|
"mypy",
|
||||||
"pre-commit",
|
"pre-commit",
|
||||||
"pytest>6.0.0",
|
"pytest>6.0.0",
|
||||||
@ -108,7 +105,7 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
"xformers" = [
|
"xformers" = [
|
||||||
"xformers==0.0.22post7; sys_platform!='darwin'",
|
"xformers==0.0.22post7; sys_platform!='darwin'",
|
||||||
"triton; sys_platform=='linux'",
|
"triton; sys_platform=='linux'",
|
||||||
]
|
]
|
||||||
"onnx" = ["onnxruntime"]
|
"onnx" = ["onnxruntime"]
|
||||||
"onnx-cuda" = ["onnxruntime-gpu"]
|
"onnx-cuda" = ["onnxruntime-gpu"]
|
||||||
@ -194,10 +191,16 @@ directory = "coverage/html"
|
|||||||
output = "coverage/index.xml"
|
output = "coverage/index.xml"
|
||||||
#=== End: PyTest and Coverage
|
#=== End: PyTest and Coverage
|
||||||
|
|
||||||
[tool.flake8]
|
#=== Begin: Ruff
|
||||||
max-line-length = 120
|
[tool.ruff]
|
||||||
ignore = ["E203", "E266", "E501", "W503"]
|
line-length = 120
|
||||||
select = ["B", "C", "E", "F", "W", "T4"]
|
ignore = [
|
||||||
|
"E501", # https://docs.astral.sh/ruff/rules/line-too-long/
|
||||||
|
"C901", # https://docs.astral.sh/ruff/rules/complex-structure/
|
||||||
|
"B008", # https://docs.astral.sh/ruff/rules/function-call-in-default-argument/
|
||||||
|
"B904", # https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/
|
||||||
|
]
|
||||||
|
select = ["B", "C", "E", "F", "W"]
|
||||||
exclude = [
|
exclude = [
|
||||||
".git",
|
".git",
|
||||||
"__pycache__",
|
"__pycache__",
|
||||||
@ -206,14 +209,9 @@ exclude = [
|
|||||||
"invokeai/frontend/web/node_modules/",
|
"invokeai/frontend/web/node_modules/",
|
||||||
".venv*",
|
".venv*",
|
||||||
]
|
]
|
||||||
|
#=== End: Ruff
|
||||||
|
|
||||||
[tool.black]
|
#=== Begin: MyPy
|
||||||
line-length = 120
|
|
||||||
|
|
||||||
[tool.isort]
|
|
||||||
profile = "black"
|
|
||||||
line_length = 120
|
|
||||||
|
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
ignore_missing_imports = true # ignores missing types in third-party libraries
|
ignore_missing_imports = true # ignores missing types in third-party libraries
|
||||||
|
|
||||||
@ -263,3 +261,4 @@ module = [
|
|||||||
"invokeai.backend.util.util",
|
"invokeai.backend.util.util",
|
||||||
"invokeai.frontend.install.model_install",
|
"invokeai.frontend.install.model_install",
|
||||||
]
|
]
|
||||||
|
#=== End: MyPy
|
||||||
|
Loading…
Reference in New Issue
Block a user