fix: remove unnecessary type conversions and promote lint rule to error - #40959
Closed
FasihUrRahman wants to merge 2 commits into
Closed
fix: remove unnecessary type conversions and promote lint rule to error#40959FasihUrRahman wants to merge 2 commits into
FasihUrRahman wants to merge 2 commits into
Conversation
Remove redundant str() and bool() wrapper calls that perform no-op type conversions: - api/commands/account.py: Click string options are already str, str(new_password).strip() → new_password.strip() (lines 23, 65) - api/core/workflow/nodes/agent_v2/runtime_feature_manifest.py: any(bool(item) for item in value.values()) → any(value.values()) since any() already evaluates truthiness (line 41) Promote unnecessary-type-conversion from 'info' to 'error' in api/pyproject.toml so CI catches future regressions. Closes langgenius#39947
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-08-19 03:48:41.931411048 +0000
+++ /tmp/pyrefly_pr.txt 2026-08-19 03:48:28.292246091 +0000
@@ -460,6 +460,744 @@
--> providers/vdb/vdb-weaviate/tests/unit_tests/test_weaviate_vector.py:891:42
ERROR Argument `SimpleNamespace` is not assignable to parameter `dataset` with type `Dataset` in function `dify_vdb_weaviate.weaviate_vector.WeaviateVectorFactory.init_vector` [bad-argument-type]
--> providers/vdb/vdb-weaviate/tests/unit_tests/test_weaviate_vector.py:920:42
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> configs/remote_settings_sources/apollo/client.py:266:32
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:367:88
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:385:92
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:503:19
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:513:21
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:950:68
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:963:37
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/agent/roster.py:988:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/agent_config_inspector.py:1094:44
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:115:21
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:115:69
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:133:21
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:133:69
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:520:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:526:19
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:527:42
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:549:54
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:556:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:645:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:651:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:678:95
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:716:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:718:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:723:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:725:17
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:732:76
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:878:92
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:882:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:884:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:887:83
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:893:76
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:1020:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:1022:21
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app.py:1029:80
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app_import.py:59:28
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/app_import.py:71:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/completion.py:362:93
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/workflow.py:1439:59
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/app/workflow.py:1439:100
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> controllers/console/auth/error.py:58:58
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> controllers/console/auth/error.py:68:58
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> controllers/console/auth/error.py:78:58
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> controllers/console/auth/error.py:88:58
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> controllers/console/auth/error.py:134:58
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> controllers/console/auth/error.py:144:58
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/datasets/datasets.py:459:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/datasets/datasets.py:468:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/datasets/external.py:373:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/datasets/external.py:375:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/explore/installed_app.py:164:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/explore/saved_message.py:42:41
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/explore/saved_message.py:67:66
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/explore/wraps.py:27:46
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/explore/wraps.py:58:32
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/explore/wraps.py:80:85
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/notification.py:101:61
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/notification.py:148:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/workspace/rbac.py:157:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/workspace/snippets.py:224:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/workspace/snippets.py:268:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/workspace/snippets.py:307:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/workspace/snippets.py:424:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/console/workspace/snippets.py:454:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/account.py:95:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:83:42
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:105:19
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:110:37
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:188:34
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:195:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:195:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:200:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:205:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps.py:240:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps_permitted_external.py:61:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps_permitted_external.py:63:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps_permitted_external.py:64:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps_permitted_external.py:71:43
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps_permitted_external.py:74:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/apps_permitted_external.py:79:37
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/prepare.py:39:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/prepare.py:83:82
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/prepare.py:94:22
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/prepare.py:95:19
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/prepare.py:106:85
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/verify.py:38:60
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/verify.py:66:22
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/auth/verify.py:131:15
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/oauth_device.py:253:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/oauth_device.py:266:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/workspaces.py:59:15
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/workspaces.py:185:39
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/workspaces.py:216:26
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/workspaces.py:218:26
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/workspaces.py:296:15
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/openapi/workspaces.py:306:15
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> controllers/service_api/dataset/document.py:379:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/agent/base_agent_runner.py:262:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/agent/fc_agent_runner.py:58:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/agent/fc_agent_runner.py:68:37
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/agent/fc_agent_runner.py:90:61
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/agent/fc_agent_runner.py:217:44
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/advanced_chat/app_generator.py:229:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/agent_app/app_runner.py:525:25
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/message_based_app_queue_manager.py:25:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/message_based_app_queue_manager.py:27:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/message_generator.py:13:41
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/streaming_utils.py:69:27
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> core/app/apps/workflow/generate_task_pipeline.py:187:43
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> core/app/apps/workflow/generate_task_pipeline.py:188:44
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/apps/workflow_app_runner.py:341:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/file_access/scope.py:50:44
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/file_access/scope.py:67:40
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/file_access/scope.py:83:15
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:435:16
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> core/app/task_pipeline/easy_ui_based_generate_task_pipeline.py:435:51
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/task_pipeline/message_file_utils.py:51:74
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/app/task_pipeline/message_file_utils.py:57:74
+ERROR Unnecessary `bytes()` call; argument is already of type `bytes` [unnecessary-type-conversion]
+ --> core/base/tts/app_generator_tts_publisher.py:47:54
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/datasource/datasource_manager.py:269:45
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/datasource/datasource_manager.py:362:57
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/helper/creators.py:37:20
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> core/indexing_runner.py:131:47
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/entities/trace_entity.py:50:19
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/ops_trace_manager.py:188:46
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/ops_trace_manager.py:941:32
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/ops_trace_manager.py:1025:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/ops_trace_manager.py:1068:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/ops_trace_manager.py:1104:32
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/ops/ops_trace_manager.py:1418:37
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/plugin/impl/base.py:309:97
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/plugin/impl/endpoint.py:107:41
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/prompt/simple_prompt_transform.py:61:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/datasource/retrieval_service.py:366:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/datasource/retrieval_service.py:446:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/datasource/retrieval_service.py:896:28
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/datasource/retrieval_service.py:929:46
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/datasource/retrieval_service.py:967:59
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/datasource/vdb/vector_factory.py:204:39
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/extractor/unstructured/unstructured_doc_extractor.py:36:48
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/extractor/word_extractor.py:152:42
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/retrieval/dataset_retrieval.py:336:60
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/retrieval/dataset_retrieval.py:966:66
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/retrieval/dataset_retrieval.py:979:66
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/retrieval/dataset_retrieval.py:994:57
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/rag/retrieval/dataset_retrieval.py:1028:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/custom_tool/tool.py:36:19
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/tool_file_manager.py:35:57
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/utils/message_transformer.py:97:41
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/utils/message_transformer.py:141:71
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/workflow_as_tool/tool.py:349:46
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/workflow_as_tool/tool.py:406:46
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/tools/workflow_as_tool/tool.py:414:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/trigger/debug/events.py:67:63
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:280:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:283:22
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:305:21
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:306:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:307:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:308:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:633:28
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:634:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:1196:44
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:1517:23
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:1518:23
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> core/workflow/generator/runner.py:1519:26
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/tool_catalogue.py:263:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/tool_catalogue.py:360:21
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/tool_catalogue.py:361:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/generator/tool_catalogue.py:361:89
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/node_factory.py:421:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/node_factory.py:700:101
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/nodes/agent/runtime_support.py:67:50
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/nodes/agent_v2/output_file_rebacker.py:54:53
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> core/workflow/workflow_entry.py:217:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> enterprise/telemetry/enterprise_trace.py:496:68
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> enterprise/telemetry/enterprise_trace.py:787:68
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> enterprise/telemetry/enterprise_trace.py:788:53
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> enterprise/telemetry/exporter.py:51:16
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> extensions/ext_enterprise_telemetry.py:30:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> extensions/otel/instrumentation.py:123:49
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> extensions/otel/instrumentation.py:125:58
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/builders.py:231:57
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/builders.py:278:74
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/builders.py:279:61
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/builders.py:349:57
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/builders.py:392:57
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/storage_keys.py:96:34
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> factories/file_factory/storage_keys.py:104:34
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/archive_storage.py:29:21
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> libs/broadcast_channel/redis/streams_channel.py:35:42
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> libs/db_migration_lock.py:71:34
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> libs/db_migration_lock.py:73:18
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> libs/db_migration_lock.py:119:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/helper.py:270:32
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/helper.py:272:15
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/helper.py:408:20
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> libs/helper.py:613:28
+ERROR Unnecessary `bytes()` call; argument is already of type `bytes` [unnecessary-type-conversion]
+ --> libs/jws.py:33:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/oauth.py:248:61
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/oauth.py:310:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/oauth_bearer.py:430:37
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> libs/oauth_bearer.py:432:35
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> libs/token.py:119:20
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> libs/token.py:145:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> models/model.py:1996:22
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> models/model.py:1997:26
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> models/model.py:1998:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> models/model.py:1999:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> models/model.py:2003:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> models/model.py:2004:35
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_node_execution_repository.py:463:19
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_node_execution_repository.py:463:47
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_run_repository.py:894:32
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_run_repository.py:897:37
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_run_repository.py:945:28
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_run_repository.py:948:32
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_api_workflow_run_repository.py:951:37
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> repositories/sqlalchemy_workflow_trigger_log_repository.py:144:19
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/clean_embedding_cache_task.py:17:21
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/clean_oauth_access_tokens_task.py:29:25
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/trigger_provider_refresh_task.py:27:24
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/trigger_provider_refresh_task.py:31:55
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/trigger_provider_refresh_task.py:55:26
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/trigger_provider_refresh_task.py:56:33
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> schedule/trigger_provider_refresh_task.py:60:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:190:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:537:55
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:540:51
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1368:71
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1370:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1706:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1707:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1720:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1720:40
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1720:58
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1781:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1781:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1890:34
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1895:34
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1897:42
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1905:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:1910:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:2039:63
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:2044:55
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:2121:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:2133:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:2163:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/account_service.py:2203:48
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:138:19
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:138:54
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:163:34
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:164:33
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:422:20
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:425:19
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/agent/observability_service.py:632:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/agent_drive_service.py:613:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/agent_drive_service.py:613:77
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:123:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:179:65
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:186:73
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:191:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:204:67
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:211:75
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:214:48
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:542:68
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/annotation_service.py:552:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/credit_pool_service.py:124:84
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> services/credit_pool_service.py:128:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/dataset_service.py:1667:43
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/dataset_service.py:1703:43
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/dataset_service.py:1835:19
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/dataset_service.py:1864:43
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/dataset_service.py:2801:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/enterprise/rbac_service.py:290:22
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/enterprise/rbac_service.py:292:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/enterprise/rbac_service.py:602:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/enterprise/rbac_service.py:746:102
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/file_service.py:320:46
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/file_service.py:330:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:721:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:829:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:854:87
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:860:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:865:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:868:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:878:51
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:883:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:892:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:895:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:915:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:932:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:959:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1065:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1089:97
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1095:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1101:56
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1106:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1126:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1143:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1169:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1279:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1303:101
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1309:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1316:58
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1321:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1341:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1358:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1397:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1424:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1534:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1558:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1566:38
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1594:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1611:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1748:39
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1767:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1799:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:1914:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2057:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2058:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2084:95
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2124:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2141:24
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2159:25
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2180:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2182:42
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2195:25
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2212:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/legacy_model_type_migration.py:2221:31
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/oauth_device_flow.py:446:31
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> services/openapi/visibility.py:32:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/retention/conversation/message_export_service.py:280:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/retention/conversation/messages_clean_policy.py:163:23
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/retention/conversation/messages_clean_policy.py:164:34
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/retention/workflow_run/bundle_archive_maintenance.py:875:32
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/retention/workflow_run/restore_archived_workflow_run.py:353:29
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/trigger/schedule_service.py:186:28
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/trigger/trigger_provider_service.py:243:34
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/trigger/trigger_provider_service.py:555:52
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/trigger/trigger_provider_service.py:563:63
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/trigger/trigger_provider_service.py:586:31
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/trigger/trigger_provider_service.py:600:42
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/trigger/trigger_provider_service.py:610:59
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> services/vector_space_admission_service.py:320:37
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/vector_space_admission_service.py:321:32
+ERROR Unnecessary `bool()` call; argument is already of type `bool` [unnecessary-type-conversion]
+ --> services/workflow_collaboration_service.py:476:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/workflow_comment_service.py:50:16
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/workflow_comment_service.py:170:27
+ERROR Unnecessary `float()` call; argument is already of type `float` [unnecessary-type-conversion]
+ --> services/workflow_event_snapshot_service.py:619:31
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/workflow_event_snapshot_service.py:620:29
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/workflow_event_snapshot_service.py:621:28
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> services/workflow_run_service.py:125:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> services/workflow_service.py:339:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/batch_import_annotations_task.py:34:60
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/batch_import_annotations_task.py:97:86
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/disable_annotation_reply_task.py:43:67
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/disable_annotation_reply_task.py:44:75
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/disable_annotation_reply_task.py:76:83
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/enable_annotation_reply_task.py:48:65
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/enable_annotation_reply_task.py:49:73
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/annotation/enable_annotation_reply_task.py:134:81
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/async_workflow_tasks.py:158:42
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tasks/document_indexing_task.py:71:41
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tasks/duplicate_document_indexing_task.py:99:45
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tasks/process_tenant_plugin_autoupgrade_check_task.py:85:15
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tasks/trigger_subscription_refresh_tasks.py:30:33
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tasks/trigger_subscription_refresh_tasks.py:33:16
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tasks/trigger_subscription_refresh_tasks.py:59:33
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tasks/trigger_subscription_refresh_tasks.py:60:44
ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
--> tests/helpers/legacy_model_type_migration.py:64:16
ERROR Object of class `FromClause` has no attribute `metadata` [missing-attribute]
@@ -630,6 +1368,26 @@
--> tests/integration_tests/workflow/test_response_stream_filter_integration.py:75:37
ERROR Argument `core.workflow.nodes.human_input.entities.HumanInputNodeData` is not assignable to parameter `data` with type `graphon.nodes.human_input.entities.HumanInputNodeData` in function `graphon.nodes.human_input.human_input_node.HumanInputNode.__init__` [bad-argument-type]
--> tests/integration_tests/workflow/test_response_stream_filter_pause_resume_integration.py:113:14
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/conftest.py:84:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/conftest.py:112:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_account_sessions.py:36:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_apps.py:68:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_apps.py:91:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_apps.py:91:73
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_apps.py:96:50
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_apps.py:115:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_apps.py:115:82
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/controllers/openapi/test_files.py:63:39
ERROR Argument `Literal['image']` is not assignable to parameter `value` with type `IconType | SQLCoreOperations[IconType | None] | None` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
--> tests/test_containers_integration_tests/controllers/web/test_site.py:116:26
ERROR Argument `SimpleNamespace` is not assignable to parameter `webapp_settings` with type `WebAppSettings | None` in function `controllers.web.wraps._validate_user_accessibility` [bad-argument-type]
@@ -742,6 +1500,8 @@
--> tests/test_containers_integration_tests/helpers/execution_extra_content.py:48:14
ERROR Returned type `int | str` is not assignable to declared return type `str` [bad-return]
--> tests/test_containers_integration_tests/libs/broadcast_channel/redis/test_sharded_channel.py:363:16
+ERROR Unnecessary `int()` call; argument is already of type `int` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/libs/broadcast_channel/redis/test_sharded_channel.py:388:19
ERROR Object of class `TypeEngine` has no attribute `length` [missing-attribute]
--> tests/test_containers_integration_tests/models/test_types_enum_text.py:104:16
ERROR Object of class `NoneType` has no attribute `user_type` [missing-attribute]
@@ -810,6 +1570,14 @@
--> tests/test_containers_integration_tests/services/test_account_service.py:2434:33
ERROR TypedDict `TenantCustomConfigDict` does not have key `feature_flags` [bad-typed-dict-key]
--> tests/test_containers_integration_tests/services/test_account_service.py:2435:33
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_account_service.py:3134:52
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_account_service.py:3319:51
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_account_service.py:3373:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_account_service.py:3484:30
ERROR Argument `dict[str, AppMode | str] | dict[str, str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_advanced_prompt_template_service.py:718:63
ERROR Argument `dict[str, AppMode | str]` is not assignable to parameter `args` with type `AdvancedPromptTemplateArgs` in function `services.advanced_prompt_template_service.AdvancedPromptTemplateService.get_prompt` [bad-argument-type]
@@ -838,6 +1606,8 @@
--> tests/test_containers_integration_tests/services/test_annotation_service.py:961:27
ERROR Object of class `int` has no attribute `lower` [missing-attribute]
--> tests/test_containers_integration_tests/services/test_annotation_service.py:1007:27
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_annotation_service.py:1029:36
ERROR TypedDict `AnnotationSettingDisabledDict` does not have key `id` [bad-typed-dict-key]
--> tests/test_containers_integration_tests/services/test_annotation_service.py:1049:23
ERROR TypedDict `AnnotationSettingDisabledDict` does not have key `score_threshold` [bad-typed-dict-key]
@@ -846,6 +1616,16 @@
--> tests/test_containers_integration_tests/services/test_annotation_service.py:1051:23
ERROR TypedDict `AnnotationSettingDisabledDict` does not have key `embedding_model` [bad-typed-dict-key]
--> tests/test_containers_integration_tests/services/test_annotation_service.py:1052:23
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_annotation_service.py:1089:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_annotation_service.py:1195:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_annotation_service.py:1258:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_annotation_service.py:1336:36
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_annotation_service.py:1402:36
ERROR Object of class `NoneType` has no attribute `id` [missing-attribute]
--> tests/test_containers_integration_tests/services/test_api_based_extension_service.py:226:17
ERROR Argument `None` is not assignable to parameter `value` with type `SQLCoreOperations[str] | str` in function `sqlalchemy.orm.base.Mapped.__set__` [bad-argument-type]
@@ -1106,6 +1886,32 @@
--> tests/test_containers_integration_tests/services/test_file_service.py:69:20
ERROR Argument `Literal['normal']` is not assignable to parameter `status` with type `SQLCoreOperations[TenantStatus] | TenantStatus` in function `models.account.Tenant.__init__` [bad-argument-type]
--> tests/test_containers_integration_tests/services/test_file_service.py:78:20
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:114:26
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:143:98
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:452:50
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:453:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:485:50
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:486:35
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/test_containers_integration_tests/services/test_file_service.py:529:30
+ERROR Unnecessary `str()` call; argument is already of type `str` [unnecessary-type-conversion]
+ --> tests/\n\n... (truncated) ... |
Contributor
Pyrefly Type Coverage
|
Member
|
Thank you for taking the time to contribute to Dify. This pull request currently has merge conflicts with the latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #39947
Remove redundant type constructor calls that perform no-op conversions, and promote the
unnecessary-type-conversionPyrefly lint rule frominfotoerrorso CI catches future regressions.Changes
api/commands/account.py(lines 23, 65)str(new_password).strip(),str(new_email).strip()new_password.strip(),new_email.strip()@click.optionstring parameters are alreadystr. The outerstr()is redundant.api/core/workflow/nodes/agent_v2/runtime_feature_manifest.py(line 41)any(bool(item) for item in value.values())any(value.values())any()already evaluates truthiness of each element; wrapping each inbool()is unnecessary.api/pyproject.tomlunnecessary-type-conversion = "info"unnecessary-type-conversion = "error"errorto prevent regressions.Notes
Other
bool(value)calls in the codebase (e.g., indsl.py,parameters.py,custom_tool/tool.py) are intentional type coercions — they convert non-bool inputs to bool for explicit return types. These are not flagged by Pyrefly as unnecessary.