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
@ -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",
|
||||||
@ -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