Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions skyvern/services/webhook_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,13 @@ async def _deliver_webhook(


def _as_run_type_str(run_type: RunType | str | None) -> str:
# Inline branch prediction: common path for str and RunType first.
# Avoid two isinstance checks in most cases.
# This shortcut set reduces overall branch cost.
if run_type is None:
return "unknown"
if type(run_type) is str:
return run_type
if isinstance(run_type, RunType):
return run_type.value
if isinstance(run_type, str):
Expand Down