@@ -116,9 +116,10 @@ def delete_artifacts(self, **kwargs: Any) -> None:
116116 def artifacts (
117117 self ,
118118 streamed : bool = False ,
119- iterator : bool = False ,
120119 action : Optional [Callable [..., Any ]] = None ,
121120 chunk_size : int = 1024 ,
121+ * ,
122+ iterator : bool = False ,
122123 ** kwargs : Any ,
123124 ) -> Optional [Union [bytes , Iterator [Any ]]]:
124125 """Get the job artifacts.
@@ -147,17 +148,20 @@ def artifacts(
147148 )
148149 if TYPE_CHECKING :
149150 assert isinstance (result , requests .Response )
150- return utils .response_content (result , streamed , iterator , action , chunk_size )
151+ return utils .response_content (
152+ result , streamed , action , chunk_size , iterator = iterator
153+ )
151154
152155 @cli .register_custom_action ("ProjectJob" )
153156 @exc .on_http_error (exc .GitlabGetError )
154157 def artifact (
155158 self ,
156159 path : str ,
157160 streamed : bool = False ,
158- iterator : bool = False ,
159161 action : Optional [Callable [..., Any ]] = None ,
160162 chunk_size : int = 1024 ,
163+ * ,
164+ iterator : bool = False ,
161165 ** kwargs : Any ,
162166 ) -> Optional [Union [bytes , Iterator [Any ]]]:
163167 """Get a single artifact file from within the job's artifacts archive.
@@ -187,16 +191,19 @@ def artifact(
187191 )
188192 if TYPE_CHECKING :
189193 assert isinstance (result , requests .Response )
190- return utils .response_content (result , streamed , iterator , action , chunk_size )
194+ return utils .response_content (
195+ result , streamed , action , chunk_size , iterator = iterator
196+ )
191197
192198 @cli .register_custom_action ("ProjectJob" )
193199 @exc .on_http_error (exc .GitlabGetError )
194200 def trace (
195201 self ,
196202 streamed : bool = False ,
197- iterator : bool = False ,
198203 action : Optional [Callable [..., Any ]] = None ,
199204 chunk_size : int = 1024 ,
205+ * ,
206+ iterator : bool = False ,
200207 ** kwargs : Any ,
201208 ) -> Dict [str , Any ]:
202209 """Get the job trace.
@@ -226,7 +233,7 @@ def trace(
226233 if TYPE_CHECKING :
227234 assert isinstance (result , requests .Response )
228235 return_value = utils .response_content (
229- result , streamed , iterator , action , chunk_size
236+ result , streamed , action , chunk_size , iterator = iterator
230237 )
231238 if TYPE_CHECKING :
232239 assert isinstance (return_value , dict )
0 commit comments