[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-10-30 09:08:11 +00:00
committed by GitHub
parent 8cbd124b80
commit eb3b5f751a
32 changed files with 151 additions and 142 deletions

View File

@ -204,7 +204,7 @@ class ScheduleService:
return ScheduleConfig(node_id=node_id, cron_expression=cron_expression, timezone=timezone)
@staticmethod
def extract_schedule_config(workflow: Workflow) -> Optional[ScheduleConfig]:
def extract_schedule_config(workflow: Workflow) -> ScheduleConfig | None:
"""
Extracts schedule configuration from workflow graph.

View File

@ -117,7 +117,7 @@ class TriggerProviderService:
parameters: Mapping[str, Any],
properties: Mapping[str, Any],
credentials: Mapping[str, str],
subscription_id: Optional[str] = None,
subscription_id: str | None = None,
credential_expires_at: int = -1,
expires_at: int = -1,
) -> Mapping[str, Any]:
@ -435,7 +435,7 @@ class TriggerProviderService:
return {"result": "success", "expires_at": int(refreshed.expires_at)}
@classmethod
def get_oauth_client(cls, tenant_id: str, provider_id: TriggerProviderID) -> Optional[Mapping[str, Any]]:
def get_oauth_client(cls, tenant_id: str, provider_id: TriggerProviderID) -> Mapping[str, Any] | None:
"""
Get OAuth client configuration for a provider.
First tries tenant-level OAuth, then falls back to system OAuth.
@ -509,8 +509,8 @@ class TriggerProviderService:
cls,
tenant_id: str,
provider_id: TriggerProviderID,
client_params: Optional[Mapping[str, Any]] = None,
enabled: Optional[bool] = None,
client_params: Mapping[str, Any] | None = None,
enabled: bool | None = None,
) -> Mapping[str, Any]:
"""
Save or update custom OAuth client parameters for a trigger provider.

View File

@ -67,7 +67,7 @@ class WebhookService:
with Session(db.engine) as session:
# Get webhook trigger
webhook_trigger = (
session.query(WorkflowWebhookTrigger).filter(WorkflowWebhookTrigger.webhook_id == webhook_id).first()
session.query(WorkflowWebhookTrigger).where(WorkflowWebhookTrigger.webhook_id == webhook_id).first()
)
if not webhook_trigger:
raise ValueError(f"Webhook not found: {webhook_id}")