File tree Expand file tree Collapse file tree 1 file changed +17
-20
lines changed
src/sagemaker/cli/compatibility/v2/modifiers Expand file tree Collapse file tree 1 file changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -79,26 +79,23 @@ def modify_node(self, node):
79
79
if arg :
80
80
args .append (arg )
81
81
82
- if matching .matches_name (node , GET_IMAGE_URI_NAME ) or matching .matches_attr (
83
- node , GET_IMAGE_URI_NAME
84
- ):
85
- func = node .func
86
- has_sagemaker = False
87
- while hasattr (func , "value" ):
88
- if hasattr (func .value , "id" ) and func .value .id == "sagemaker" :
89
- has_sagemaker = True
90
- break
91
- func = func .value
92
-
93
- if has_sagemaker :
94
- node .func = ast .Attribute (
95
- value = ast .Attribute (attr = "image_uris" , value = ast .Name (id = "sagemaker" )),
96
- attr = "retrieve" ,
97
- )
98
- else :
99
- node .func = ast .Attribute (value = ast .Name (id = "image_uris" ), attr = "retrieve" )
100
- node .args = args
101
- node .keywords = []
82
+ func = node .func
83
+ has_sagemaker = False
84
+ while hasattr (func , "value" ):
85
+ if hasattr (func .value , "id" ) and func .value .id == "sagemaker" :
86
+ has_sagemaker = True
87
+ break
88
+ func = func .value
89
+
90
+ if has_sagemaker :
91
+ node .func = ast .Attribute (
92
+ value = ast .Attribute (attr = "image_uris" , value = ast .Name (id = "sagemaker" )),
93
+ attr = "retrieve" ,
94
+ )
95
+ else :
96
+ node .func = ast .Attribute (value = ast .Name (id = "image_uris" ), attr = "retrieve" )
97
+ node .args = args
98
+ node .keywords = []
102
99
return node
103
100
104
101
You can’t perform that action at this time.
0 commit comments