22GitLab API:
33https://docs.gitlab.com/ee/api/job_artifacts.html
44"""
5- from typing import Any , Callable , Iterator , Literal , Optional , TYPE_CHECKING , Union
5+ from typing import Any , Callable , Optional , TYPE_CHECKING
66
77import requests
88
@@ -32,7 +32,7 @@ def __call__(
3232 self ,
3333 * args : Any ,
3434 ** kwargs : Any ,
35- ) -> Optional [Union [ bytes , Iterator [ Any ]] ]:
35+ ) -> Optional [bytes ]:
3636 utils .warn (
3737 message = (
3838 "The project.artifacts() method is deprecated and will be removed in a "
@@ -71,10 +71,10 @@ def download(
7171 ref_name : str ,
7272 job : str ,
7373 streamed : bool = False ,
74- action : Optional [Union [ Callable , Literal [ "iterator" ]] ] = None ,
74+ action : Optional [Callable ] = None ,
7575 chunk_size : int = 1024 ,
7676 ** kwargs : Any ,
77- ) -> Optional [Union [ bytes , Iterator [ Any ]] ]:
77+ ) -> Optional [bytes ]:
7878 """Get the job artifacts archive from a specific tag or branch.
7979
8080 Args:
@@ -86,8 +86,7 @@ def download(
8686 `chunk_size` and each chunk is passed to `action` for
8787 treatment
8888 action: Callable responsible of dealing with chunk of
89- data. May also be the string "iterator" to directly return
90- the response iterator
89+ data
9190 chunk_size: Size of each chunk
9291 **kwargs: Extra options to send to the server (e.g. sudo)
9392
@@ -116,10 +115,10 @@ def raw(
116115 artifact_path : str ,
117116 job : str ,
118117 streamed : bool = False ,
119- action : Optional [Union [ Callable , Literal [ "iterator" ]] ] = None ,
118+ action : Optional [Callable ] = None ,
120119 chunk_size : int = 1024 ,
121120 ** kwargs : Any ,
122- ) -> Optional [Union [ bytes , Iterator [ Any ]] ]:
121+ ) -> Optional [bytes ]:
123122 """Download a single artifact file from a specific tag or branch from
124123 within the job's artifacts archive.
125124
0 commit comments