Skip to content

Commit 915297d

Browse files
committed
flake8
1 parent 3fa6c8f commit 915297d

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/unit/sagemaker/jumpstart/hub/test_utils.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def test_walk_and_apply_json():
264264
"CamelCaseObjectChildTwo": "value2",
265265
},
266266
"IgnoreMyChildren": {"ShouldNotBeTouchedOne": "const1", "ShouldNotBeTouchedTwo": "const2"},
267-
"ShouldNotIgnoreMyChildren": {"NopeNope": "no"}
267+
"ShouldNotIgnoreMyChildren": {"NopeNope": "no"},
268268
}
269269

270270
result = parser_utils.walk_and_apply_json(
@@ -280,35 +280,26 @@ def test_walk_and_apply_json():
280280
"ShouldNotBeTouchedOne": "const1",
281281
"ShouldNotBeTouchedTwo": "const2",
282282
},
283-
"should_not_ignore_my_children": { "nope_nope": "no"}
283+
"should_not_ignore_my_children": {"nope_nope": "no"},
284284
}
285285

286+
286287
def test_walk_and_apply_json_no_stop():
287288
test_json = {
288289
"CamelCaseKey": "value",
289290
"CamelCaseObjectKey": {
290291
"CamelCaseObjectChildOne": "value1",
291292
"CamelCaseObjectChildTwo": "value2",
292293
},
293-
"CamelCaseObjectListKey": {
294-
"instance.ml.type.xlarge": [
295-
{"ShouldChangeMe": "string"}
296-
]
297-
}
294+
"CamelCaseObjectListKey": {"instance.ml.type.xlarge": [{"ShouldChangeMe": "string"}]},
298295
}
299296

300-
result = parser_utils.walk_and_apply_json(
301-
test_json, parser_utils.camel_to_snake
302-
)
297+
result = parser_utils.walk_and_apply_json(test_json, parser_utils.camel_to_snake)
303298
assert result == {
304299
"camel_case_key": "value",
305300
"camel_case_object_key": {
306301
"camel_case_object_child_one": "value1",
307302
"camel_case_object_child_two": "value2",
308303
},
309-
"camel_case_object_list_key": {
310-
"instance.ml.type.xlarge": [
311-
{ "should_change_me": "string" }
312-
]
313-
},
304+
"camel_case_object_list_key": {"instance.ml.type.xlarge": [{"should_change_me": "string"}]},
314305
}

0 commit comments

Comments
 (0)