@@ -83,9 +83,7 @@ def click_echo_ok_responses(self) -> None:
8383 click .echo (response .msg )
8484
8585 @staticmethod
86- def _prepare_status (
87- log : Dict [str , Union [str , Dict [str , str ]]]
88- ) -> DockerReadResponse :
86+ def _prepare_status (log : Dict [str , Union [str , Dict [str , str ]]]) -> DockerReadResponse :
8987 status_message = cast (str , log ["status" ])
9088 progress_detail = cast (str , log .get ("progressDetail" , "" ))
9189 status_id = cast (str , log .get ("id" , "" ))
@@ -98,9 +96,7 @@ def _prepare_status(
9896 return DockerReadResponse (message , False )
9997
10098 @staticmethod
101- def _prepare_stream (
102- log : Dict [str , Union [str , Dict [str , str ]]]
103- ) -> List [DockerReadResponse ]:
99+ def _prepare_stream (log : Dict [str , Union [str , Dict [str , str ]]]) -> List [DockerReadResponse ]:
104100 stream = cast (str , log ["stream" ])
105101 return list (
106102 map (
@@ -110,9 +106,7 @@ def _prepare_stream(
110106 )
111107
112108 @staticmethod
113- def _prepare_aux (
114- log : Dict [str , Union [str , Dict [str , str ]]]
115- ) -> List [DockerReadResponse ]:
109+ def _prepare_aux (log : Dict [str , Union [str , Dict [str , str ]]]) -> List [DockerReadResponse ]:
116110 aux = cast (Dict [str , str ], log ["aux" ])
117111 to_return = []
118112 if "Digest" in aux :
@@ -122,21 +116,15 @@ def _prepare_aux(
122116 return to_return
123117
124118 @staticmethod
125- def _prepare_error_detail (
126- log : Dict [str , Union [str , Dict [str , str ]]]
127- ) -> DockerReadResponse :
119+ def _prepare_error_detail (log : Dict [str , Union [str , Dict [str , str ]]]) -> DockerReadResponse :
128120 error_detail = cast (Dict [str , str ], log ["errorDetail" ])
129121 error_message = error_detail .get ("message" , "" )
130122 error_code = error_detail .get ("code" , None )
131123 return DockerReadResponse (
132- "ERROR: "
133- + error_message
134- + (f"\n Error code: { error_code } " if error_code else "" ),
124+ "ERROR: " + error_message + (f"\n Error code: { error_code } " if error_code else "" ),
135125 True ,
136126 )
137127
138128 @staticmethod
139- def _prepare_error (
140- log : Dict [str , Union [str , Dict [str , str ]]]
141- ) -> DockerReadResponse :
129+ def _prepare_error (log : Dict [str , Union [str , Dict [str , str ]]]) -> DockerReadResponse :
142130 return DockerReadResponse ("ERROR: " + cast (str , log ["error" ]), True )
0 commit comments