File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def camel_to_snake(camel_case_string: str) -> str:
21
21
"""Converts camelCaseString or UpperCamelCaseString to snake_case_string."""
22
22
snake_case_string = re .sub ("(.)([A-Z][a-z]+)" , r"\1_\2" , camel_case_string )
23
23
if "-" in snake_case_string :
24
- #remove any hyphen from the string for accurate conversion.
24
+ # remove any hyphen from the string for accurate conversion.
25
25
snake_case_string = snake_case_string .replace ("-" , "" )
26
26
return re .sub ("([a-z0-9])([A-Z])" , r"\1_\2" , snake_case_string ).lower ()
27
27
@@ -43,7 +43,7 @@ def walk_and_apply_json(
43
43
def _walk_and_apply_json (json_obj , new ):
44
44
if isinstance (json_obj , dict ) and isinstance (new , dict ):
45
45
for key , value in json_obj .items ():
46
- new_key = apply (key )
46
+ new_key = apply (key )
47
47
if (stop_keys and new_key not in stop_keys ) or stop_keys is None :
48
48
if isinstance (value , dict ):
49
49
new [new_key ] = {}
Original file line number Diff line number Diff line change @@ -1106,10 +1106,15 @@ def get_jumpstart_configs(
1106
1106
1107
1107
if hub_arn :
1108
1108
return (
1109
- {config_name : metadata_configs .configs [camel_to_snake (snake_to_upper_camel (config_name ))] for config_name in config_names }
1110
- if metadata_configs
1111
- else {}
1112
- )
1109
+ {
1110
+ config_name : metadata_configs .configs [
1111
+ camel_to_snake (snake_to_upper_camel (config_name ))
1112
+ ]
1113
+ for config_name in config_names
1114
+ }
1115
+ if metadata_configs
1116
+ else {}
1117
+ )
1113
1118
return (
1114
1119
{config_name : metadata_configs .configs [config_name ] for config_name in config_names }
1115
1120
if metadata_configs
You can’t perform that action at this time.
0 commit comments