Skip to content

refactor: Move trigger workflow nodes into core workflow#33444

Draft
laipz8200 wants to merge 5 commits intomainfrom
move-trigger-nodes
Draft

refactor: Move trigger workflow nodes into core workflow#33444
laipz8200 wants to merge 5 commits intomainfrom
move-trigger-nodes

Conversation

@laipz8200
Copy link
Member

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes #33442.

Move trigger-related workflow nodes into core.workflow.

Screenshots

Before After
N/A N/A

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This does't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant refactoring effort to centralize the management and ownership of trigger-related workflow nodes. By relocating these nodes from the dify_graph package to the core.workflow package, the change aims to improve the modularity, clarity, and maintainability of the codebase. This strategic move ensures that core workflow components are housed together, streamlining future development and reducing inter-package dependencies for these specific node types.

Highlights

  • Relocation of Trigger Nodes: Trigger-related workflow nodes, including plugin, schedule, and webhook types, have been moved from the dify_graph.nodes package to the core.workflow.nodes package.
  • Centralized Node Registration: A new node_mapping.py file has been introduced within core.workflow.nodes to manage the registration of these core-owned workflow nodes, ensuring they are properly discovered and utilized.
  • Updated Node Registry Logic: The base Node class in dify_graph has been modified to recognize and register node implementations from both dify_graph.nodes and the newly designated core.workflow.nodes paths, allowing for a unified node registry.
  • Extensive Import Path Updates: Numerous files across the api directory have been updated to reflect the new import paths for the relocated trigger node entities, exceptions, and node implementations, ensuring all references point to the correct locations.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • api/core/app/apps/workflow_app_runner.py
    • Updated imports to reference the new core.workflow.nodes.node_mapping.
  • api/core/trigger/debug/event_selectors.py
    • Updated imports for TriggerEventNodeData and ScheduleConfig to their new core.workflow.nodes location.
  • api/core/workflow/node_factory.py
    • Updated imports to reference the new core.workflow.nodes.node_mapping.
  • api/core/workflow/nodes/init.py
    • Added a new __init__.py file to define the core.workflow.nodes package.
  • api/core/workflow/nodes/node_mapping.py
    • Added a new module responsible for registering core-owned workflow nodes by dynamically importing modules within core.workflow.nodes.
  • api/core/workflow/nodes/trigger_plugin/init.py
    • Renamed from api/dify_graph/nodes/trigger_plugin/__init__.py.
  • api/core/workflow/nodes/trigger_plugin/entities.py
    • Renamed from api/dify_graph/nodes/trigger_plugin/entities.py and updated relative import for exceptions.
  • api/core/workflow/nodes/trigger_plugin/exc.py
    • Renamed from api/dify_graph/nodes/trigger_plugin/exc.py.
  • api/core/workflow/nodes/trigger_plugin/trigger_event_node.py
    • Renamed from api/dify_graph/nodes/trigger_plugin/trigger_event_node.py.
  • api/core/workflow/nodes/trigger_schedule/init.py
    • Added a new __init__.py file to define the core.workflow.nodes.trigger_schedule package.
  • api/core/workflow/nodes/trigger_schedule/entities.py
    • Renamed from api/dify_graph/nodes/trigger_schedule/entities.py.
  • api/core/workflow/nodes/trigger_schedule/exc.py
    • Renamed from api/dify_graph/nodes/trigger_schedule/exc.py.
  • api/core/workflow/nodes/trigger_schedule/trigger_schedule_node.py
    • Renamed from api/dify_graph/nodes/trigger_schedule/trigger_schedule_node.py and updated relative import for entities.
  • api/core/workflow/nodes/trigger_webhook/init.py
    • Renamed from api/dify_graph/nodes/trigger_webhook/__init__.py.
  • api/core/workflow/nodes/trigger_webhook/entities.py
    • Renamed from api/dify_graph/nodes/trigger_webhook/entities.py.
  • api/core/workflow/nodes/trigger_webhook/exc.py
    • Renamed from api/dify_graph/nodes/trigger_webhook/exc.py.
  • api/core/workflow/nodes/trigger_webhook/node.py
    • Renamed from api/dify_graph/nodes/trigger_webhook/node.py.
  • api/core/workflow/workflow_entry.py
    • Updated imports to reference the new core.workflow.nodes.node_mapping.
  • api/dify_graph/nodes/base/node.py
    • Modified the node registration logic to include core.workflow.nodes as a valid path for production node implementations.
    • Updated a type check from isinstance(self, TriggerEventNode) to self.node_type == NodeType.TRIGGER_PLUGIN for improved robustness.
    • Added a comment to get_node_type_classes_mapping to clarify node registration behavior.
  • api/dify_graph/nodes/trigger_schedule/init.py
    • Removed the __init__.py file as the package was relocated.
  • api/events/event_handlers/sync_workflow_schedule_when_app_published.py
    • Updated imports for SchedulePlanUpdate to its new core.workflow.nodes location.
  • api/services/app_dsl_service.py
    • Updated imports for TriggerScheduleNode to its new core.workflow.nodes location.
  • api/services/rag_pipeline/rag_pipeline.py
    • Updated imports to reference the new core.workflow.nodes.node_mapping.
  • api/services/trigger/schedule_service.py
    • Updated imports for schedule entities and exceptions to their new core.workflow.nodes location.
  • api/services/trigger/trigger_service.py
    • Updated imports for TriggerEventNodeData to its new core.workflow.nodes location.
  • api/services/trigger/webhook_service.py
    • Updated imports for webhook entities to their new core.workflow.nodes location.
  • api/services/workflow_service.py
    • Updated imports to reference the new core.workflow.nodes.node_mapping.
  • api/tasks/trigger_processing_tasks.py
    • Updated imports for TriggerEventNodeData to its new core.workflow.nodes location.
  • api/tasks/workflow_schedule_tasks.py
    • Updated imports for schedule exceptions to their new core.workflow.nodes location.
  • api/tests/unit_tests/core/test_trigger_debug_event_selectors.py
    • Updated imports for ScheduleConfig to its new core.workflow.nodes location.
  • api/tests/unit_tests/core/workflow/nodes/base/test_base_node.py
    • Updated imports to reference the new core.workflow.nodes.node_mapping.
  • api/tests/unit_tests/core/workflow/nodes/webhook/test_entities.py
    • Updated imports for webhook entities to their new core.workflow.nodes location.
  • api/tests/unit_tests/core/workflow/nodes/webhook/test_exceptions.py
    • Updated imports for webhook exceptions to their new core.workflow.nodes location and adjusted module path string in tests.
  • api/tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py
    • Updated imports for webhook entities and nodes to their new core.workflow.nodes location and adjusted patch paths.
  • api/tests/unit_tests/core/workflow/nodes/webhook/test_webhook_node.py
    • Updated imports for webhook entities and nodes to their new core.workflow.nodes location.
  • api/tests/unit_tests/libs/test_cron_compatibility.py
    • Updated imports for VisualConfig to its new core.workflow.nodes location.
  • api/tests/unit_tests/services/test_schedule_service.py
    • Updated imports for schedule entities and exceptions to their new core.workflow.nodes location.
Activity
  • The pull request addresses issue [Refactor/Chore] Move trigger-related workflow nodes into core.workflow #33442, indicating a specific problem or feature request it aims to resolve.
  • The author has confirmed understanding that the PR may be closed if there was no prior discussion or associated issues.
  • The author has not yet marked the documentation update, test coverage, or linting/type-checking checklists as complete.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 09:22:47.396402210 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 09:22:37.346407820 +0000
@@ -482,9 +482,9 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:332:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
-   --> dify_graph/nodes/base/node.py:414:32
+   --> dify_graph/nodes/base/node.py:413:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
    --> dify_graph/nodes/document_extractor/node.py:446:19
 ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

1 similar comment
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 09:22:47.396402210 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 09:22:37.346407820 +0000
@@ -482,9 +482,9 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:332:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
-   --> dify_graph/nodes/base/node.py:414:32
+   --> dify_graph/nodes/base/node.py:413:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
    --> dify_graph/nodes/document_extractor/node.py:446:19
 ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the codebase by moving trigger-related workflow nodes (trigger_plugin, trigger_schedule, trigger_webhook) from dify_graph.nodes to a new core.workflow.nodes package. This is a good structural improvement. The changes are mostly file moves and import path updates, which have been done consistently across services, tasks, and tests. A new core.workflow.nodes.node_mapping module correctly orchestrates the registration of both core and dify_graph nodes. The refactoring in dify_graph/nodes/base/node.py to use node_type for checks instead of isinstance is a welcome improvement for decoupling. The overall implementation is solid, and I did not find any issues.

@laipz8200 laipz8200 changed the title Move trigger workflow nodes into core workflow refactor: Move trigger workflow nodes into core workflow Mar 14, 2026
@laipz8200 laipz8200 marked this pull request as ready for review March 14, 2026 09:51
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Mar 14, 2026
@laipz8200 laipz8200 marked this pull request as draft March 14, 2026 09:57
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:17:57.410247135 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:17:48.752313203 +0000
@@ -484,7 +484,7 @@
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
    --> dify_graph/nodes/base/node.py:331:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
-   --> dify_graph/nodes/base/node.py:414:32
+   --> dify_graph/nodes/base/node.py:408:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
    --> dify_graph/nodes/document_extractor/node.py:446:19
 ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

1 similar comment
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:17:57.410247135 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:17:48.752313203 +0000
@@ -484,7 +484,7 @@
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
    --> dify_graph/nodes/base/node.py:331:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
-   --> dify_graph/nodes/base/node.py:414:32
+   --> dify_graph/nodes/base/node.py:408:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
    --> dify_graph/nodes/document_extractor/node.py:446:19
 ERROR `+` is not supported between `list[Unknown]` and `str` [unsupported-operation]
@@ -5255,9 +5255,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16


from dify_graph.nodes.trigger_plugin.trigger_event_node import TriggerEventNode

if isinstance(self, TriggerEventNode):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this branch drops provider_id from NodeRunStartedEvent for trigger-plugin nodes. I verified on the current head that next(TriggerEventNode(...).run()).provider_id == "", while downstream start-event consumers still use that field for trigger icon lookup in workflow_response_converter.py and workflow_app_runner.py. Please preserve the start-event provider metadata when moving the node, either by keying off self.node_type == NodeType.TRIGGER_PLUGIN here or by moving this into a node-level helper.

@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:39:31.931060418 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:39:22.106122785 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

1 similar comment
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:39:31.931060418 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:39:22.106122785 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:47:50.912428179 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:47:41.870210877 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

1 similar comment
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:47:50.912428179 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:47:41.870210877 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:52:47.889692394 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:52:38.782761096 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

1 similar comment
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 10:52:47.889692394 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 10:52:38.782761096 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

@laipz8200 laipz8200 force-pushed the move-trigger-nodes branch from a76162c to 34ef10c Compare March 14, 2026 11:14
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 11:15:40.912483522 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 11:15:31.379419476 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

1 similar comment
@github-actions
Copy link
Contributor

Pyrefly Diff

base → PR
--- /tmp/pyrefly_base.txt	2026-03-14 11:15:40.912483522 +0000
+++ /tmp/pyrefly_pr.txt	2026-03-14 11:15:31.379419476 +0000
@@ -482,7 +482,7 @@
 ERROR `reason` may be uninitialized [unbound-name]
    --> dify_graph/graph_engine/layers/execution_limits.py:141:81
 ERROR Object of class `GraphExecutionProtocol` has no attribute `node_executions` [missing-attribute]
-   --> dify_graph/nodes/base/node.py:331:31
+   --> dify_graph/nodes/base/node.py:335:31
 ERROR `str` is not assignable to attribute `id` with type `Never` [bad-assignment]
    --> dify_graph/nodes/base/node.py:414:32
 ERROR Object of class `BaseOxmlElement` has no attribute `body` [missing-attribute]
@@ -5241,6 +5241,8 @@
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:105:22
 ERROR Argument `Generator[NodeEventBase, None, LLMUsage]` is not assignable to parameter `generator` with type `Generator[Unknown]` in function `_collect_events` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/tool/test_tool_node.py:113:32
+ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
+  --> tests/unit_tests/core/workflow/nodes/trigger_plugin/test_trigger_event_node.py:39:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v1/test_variable_assigner_v1.py:107:16
 ERROR Argument `dict[str, dict[str, WriteMode | list[str] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v1.node.VariableAssignerNode.__init__` [bad-argument-type]
@@ -5255,9 +5257,9 @@
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:316:16
 ERROR Argument `dict[str, dict[str, list[dict[str, InputType | Operation | list[str] | Unknown | None]] | str] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.variable_assigner.v2.node.VariableAssignerNode.__init__` [bad-argument-type]
    --> tests/unit_tests/core/workflow/nodes/variable_assigner/v2/test_variable_assigner_v2.py:401:16
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:54:25
-ERROR Missing argument `name` in function `dify_graph.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
+ERROR Missing argument `name` in function `core.workflow.nodes.trigger_webhook.entities.WebhookBodyParameter.__init__` [missing-argument]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_entities.py:77:29
 ERROR Argument `dict[str, dict[str, Any] | str]` is not assignable to parameter `config` with type `NodeConfigDict` in function `dify_graph.nodes.base.node.Node.__init__` [bad-argument-type]
   --> tests/unit_tests/core/workflow/nodes/webhook/test_webhook_file_conversion.py:59:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Chore] Move trigger-related workflow nodes into core.workflow

1 participant