Skip to content

Commit 15a107b

Browse files
misscodedseratch
authored andcommitted
adjust step utilities to allow for optional args
1 parent e1a14b8 commit 15a107b

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

slack_bolt/workflows/step/utilities/async_complete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ def __init__(self, *, client: AsyncWebClient, body: dict):
66
self.client = client
77
self.body = body
88

9-
async def __call__(self, *, outputs: dict,) -> None:
9+
async def __call__(self, **kwargs) -> None:
1010
await self.client.workflows_stepCompleted(
1111
workflow_step_execute_id=self.body["event"]["workflow_step"][
1212
"workflow_step_execute_id"
1313
],
14-
outputs=outputs,
14+
**kwargs,
1515
)

slack_bolt/workflows/step/utilities/async_update.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ def __init__(self, *, client: AsyncWebClient, body: dict):
66
self.client = client
77
self.body = body
88

9-
async def __call__(self, *, inputs: dict, outputs: list,) -> None:
9+
async def __call__(self, **kwargs) -> None:
1010
await self.client.workflows_updateStep(
1111
workflow_step_edit_id=self.body["workflow_step"]["workflow_step_edit_id"],
12-
inputs=inputs,
13-
outputs=outputs,
12+
**kwargs,
1413
)

slack_bolt/workflows/step/utilities/complete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ def __init__(self, *, client: WebClient, body: dict):
66
self.client = client
77
self.body = body
88

9-
def __call__(self, *, outputs: dict,) -> None:
9+
def __call__(self, **kwargs) -> None:
1010
self.client.workflows_stepCompleted(
1111
workflow_step_execute_id=self.body["event"]["workflow_step"][
1212
"workflow_step_execute_id"
1313
],
14-
outputs=outputs,
14+
**kwargs,
1515
)

slack_bolt/workflows/step/utilities/configure.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ def __init__(self, *, callback_id: str, client: WebClient, body: dict):
1010
self.client = client
1111
self.body = body
1212

13-
def __call__(self, *, blocks: Optional[List[Union[dict, Block]]] = None,) -> None:
13+
def __call__(self, *, blocks: Optional[List[Union[dict, Block]]] = None, **kwargs) -> None:
1414
self.client.views_open(
1515
trigger_id=self.body["trigger_id"],
1616
view={
1717
"type": "workflow_step",
1818
"callback_id": self.callback_id,
1919
"blocks": blocks,
20+
**kwargs,
2021
},
2122
)

slack_bolt/workflows/step/utilities/update.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ def __init__(self, *, client: WebClient, body: dict):
66
self.client = client
77
self.body = body
88

9-
def __call__(self, *, inputs: dict, outputs: list,) -> None:
9+
def __call__(self, **kwargs) -> None:
1010
self.client.workflows_updateStep(
1111
workflow_step_edit_id=self.body["workflow_step"]["workflow_step_edit_id"],
12-
inputs=inputs,
13-
outputs=outputs,
12+
**kwargs,
1413
)

0 commit comments

Comments
 (0)