mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 10:25:23 -04:00
refactor: streamline trigger imports and enhance plugin registration logic
- Simplified import statements across various files by reordering and consolidating imports for better readability. - Refactored the PluginRegistration class to improve the clarity of the configuration handling logic, ensuring more concise checks for subscription constructors. These changes enhance code maintainability and readability throughout the plugin structure.
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
@@ -23,7 +23,9 @@ class IssueUnassignedEvent(Event):
|
||||
if not unassigned_from_param:
|
||||
return
|
||||
|
||||
allowed_unassignees = [unassignee.strip() for unassignee in unassigned_from_param.split(",") if unassignee.strip()]
|
||||
allowed_unassignees = [
|
||||
unassignee.strip() for unassignee in unassigned_from_param.split(",") if unassignee.strip()
|
||||
]
|
||||
if not allowed_unassignees:
|
||||
return
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from collections.abc import Mapping
|
||||
import re
|
||||
from collections.abc import Mapping
|
||||
from typing import Any
|
||||
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from werkzeug import Request
|
||||
|
||||
from dify_plugin.entities.trigger import Variables
|
||||
from dify_plugin.errors.trigger import EventIgnoreError
|
||||
from dify_plugin.interfaces.trigger import Event
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from werkzeug import Request, Response
|
||||
|
||||
from dify_plugin.entities import I18nObject, ParameterOption
|
||||
from dify_plugin.entities.oauth import TriggerOAuthCredentials
|
||||
from dify_plugin.entities.trigger import Subscription, EventDispatch, UnsubscribeResult
|
||||
from dify_plugin.entities.trigger import EventDispatch, Subscription, UnsubscribeResult
|
||||
from dify_plugin.errors.trigger import (
|
||||
SubscriptionError,
|
||||
TriggerDispatchError,
|
||||
|
||||
Reference in New Issue
Block a user