Skip to content
Discussion options

You must be logged in to vote

@bmmcwhirt thanks for the write-up! You're not doing anything wrong, there are simply some limitations with our ListMixin return types (and a few others).

The return type depends on the method signature, e.g. whether you use iterator=False (default) for listing, which returns a list. If you use iterator=True, it returns an iterator (RESTObjectList) for more efficient processing (https://python-gitlab.readthedocs.io/en/stable/api-usage.html#pagination). We just haven't taken the time to narrow this down with overloads or some other approach.

You can do some type narrowing on your own though, this should also already be documented here:
https://python-gitlab.readthedocs.io/en/stable/api-usa…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by bmmcwhirt
Comment options

You must be logged in to vote
2 replies
@bmmcwhirt
Comment options

@bmmcwhirt
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants