Skip to content

Commit 6212c8b

Browse files
author
Payton Staub
committed
Fix docstyle/black-check
1 parent d5fea7a commit 6212c8b

File tree

2 files changed

+16
-31
lines changed

2 files changed

+16
-31
lines changed

src/sagemaker/workflow/callback_step.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ class CallbackOutputTypeEnum(Enum, metaclass=DefaultEnumMeta):
4141

4242
@attr.s
4343
class CallbackOutput:
44-
"""Output for a callback step. The value of this output is provided at time of callback
45-
via the SendPipelineExecutionStepSuccess API
44+
"""Output for a callback step.
4645
4746
Attributes:
4847
output_name (str): The output name

tests/unit/sagemaker/workflow/test_callback_step.py

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,12 @@ def test_callback_step_output_expr():
6565
outputs=[outputParam1, outputParam2],
6666
)
6767

68-
assert cb_step.properties.Outputs['output1'].expr == {"Get": "Steps.MyCallbackStep.OutputParameters['output1']"}
69-
assert cb_step.properties.Outputs['output2'].expr == {"Get": "Steps.MyCallbackStep.OutputParameters['output2']"}
68+
assert cb_step.properties.Outputs["output1"].expr == {
69+
"Get": "Steps.MyCallbackStep.OutputParameters['output1']"
70+
}
71+
assert cb_step.properties.Outputs["output2"].expr == {
72+
"Get": "Steps.MyCallbackStep.OutputParameters['output2']"
73+
}
7074

7175

7276
def test_pipeline_interpolates_callback_outputs():
@@ -84,7 +88,7 @@ def test_pipeline_interpolates_callback_outputs():
8488
name="MyCallbackStep2",
8589
depends_on=["TestStep"],
8690
sqs_queue_url="https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue",
87-
inputs={"arg1": cb_step1.properties.Outputs['output1']},
91+
inputs={"arg1": cb_step1.properties.Outputs["output1"]},
8892
outputs=[outputParam2],
8993
)
9094

@@ -107,36 +111,18 @@ def test_pipeline_interpolates_callback_outputs():
107111
{
108112
"Name": "MyCallbackStep1",
109113
"Type": "Callback",
110-
"Arguments": {
111-
"arg1": "foo"
112-
},
113-
"DependsOn": [
114-
"TestStep"
115-
],
114+
"Arguments": {"arg1": "foo"},
115+
"DependsOn": ["TestStep"],
116116
"SqsQueueUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue",
117-
"OutputParameters": [
118-
{
119-
"OutputName": "output1",
120-
"OutputType": "String"
121-
}
122-
]
117+
"OutputParameters": [{"OutputName": "output1", "OutputType": "String"}],
123118
},
124119
{
125120
"Name": "MyCallbackStep2",
126121
"Type": "Callback",
127-
"Arguments": {
128-
"arg1": {"Get": "Steps.MyCallbackStep1.OutputParameters['output1']"}
129-
},
130-
"DependsOn": [
131-
"TestStep"
132-
],
122+
"Arguments": {"arg1": {"Get": "Steps.MyCallbackStep1.OutputParameters['output1']"}},
123+
"DependsOn": ["TestStep"],
133124
"SqsQueueUrl": "https://sqs.us-east-2.amazonaws.com/123456789012/MyQueue",
134-
"OutputParameters": [
135-
{
136-
"OutputName": "output2",
137-
"OutputType": "String"
138-
}
139-
]
140-
}
141-
]
125+
"OutputParameters": [{"OutputName": "output2", "OutputType": "String"}],
126+
},
127+
],
142128
}

0 commit comments

Comments
 (0)