summaryrefslogtreecommitdiff
path: root/gitlab/v4/cli.py
diff options
context:
space:
mode:
authorTom Catshoek <tomcatshoek@zeelandnet.nl>2022-06-26 08:29:13 +0200
committerGitHub <noreply@github.com>2022-06-26 08:29:13 +0200
commitb6447211754e126f64e12fc735ad74fe557b7fb4 (patch)
tree2c86425ce6b25b4d40bf0c12aa0d1f7def77838c /gitlab/v4/cli.py
parent0f2a602d3a9d6579f5fdfdf945a236ae44e93a12 (diff)
downloadgitlab-b6447211754e126f64e12fc735ad74fe557b7fb4.tar.gz
feat(downloads): allow streaming downloads access to response iterator (#1956)
* feat(downloads): allow streaming downloads access to response iterator Allow access to the underlying response iterator when downloading in streaming mode by specifying `iterator=True`. Update type annotations to support this change. * docs(api-docs): add iterator example to artifact download Document the usage of the `iterator=True` option when downloading artifacts * test(packages): add tests for streaming downloads
Diffstat (limited to 'gitlab/v4/cli.py')
-rw-r--r--gitlab/v4/cli.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py
index 2b0d4ce..ba2e788 100644
--- a/gitlab/v4/cli.py
+++ b/gitlab/v4/cli.py
@@ -127,6 +127,7 @@ class GitlabCLI:
data = export_status.download()
if TYPE_CHECKING:
assert data is not None
+ assert isinstance(data, bytes)
sys.stdout.buffer.write(data)
except Exception as e: # pragma: no cover, cli.die is unit-tested