Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: ruff with statements (#12578)

yihong831459b895c6
diff --git a/api/.ruff.toml b/api/.ruff.toml
index e319ed4d541..89a2da35d6c 100644
--- a/api/.ruff.toml
+++ b/api/.ruff.toml
@@ -69,6 +69,7 @@ ignore = [
"SIM108", # if-else-block-instead-of-if-exp
"SIM113", # enumerate-for-loop
"SIM117", # multiple-with-statements
+ "SIM210", # if-expr-with-true-false
]
[lint.per-file-ignores]
diff --git a/api/tests/integration_tests/controllers/test_controllers.py b/api/tests/integration_tests/controllers/test_controllers.py
index 5e3ee6bedc7..276ad3a7ed8 100644
--- a/api/tests/integration_tests/controllers/test_controllers.py
+++ b/api/tests/integration_tests/controllers/test_controllers.py
@@ -4,7 +4,6 @@ from app_fixture import mock_user # type: ignore
def test_post_requires_login(app):
- with app.test_client() as client:
- with patch("flask_login.utils._get_user", mock_user):
- response = client.get("/console/api/data-source/integrates")
- assert response.status_code == 200
+ with app.test_client() as client, patch("flask_login.utils._get_user", mock_user):
+ response = client.get("/console/api/data-source/integrates")
+ assert response.status_code == 200