-
Notifications
You must be signed in to change notification settings - Fork 675
Closed
Description
Currently if you request `xxx.list(as_list=False, per_page=100) you end up getting a list instead of the generator.
I think the logic in in http_list needs some rework.
Perhaps just removing the 'per_page' in kwargs condition from here
I should be able to specify something like...
my_generator = gl.projects.list(per_page=100, as_list=False)... and still get a generator. Then I can hook it up to a progress bar like:
my_generator = gl.projects.list(per_page=100, as_list=False, membership=True)
with click.progressbar(my_generator, length=my_generator.total, label='Projects') as bar:
for project in bar:
passThe above code generates the following error:
AttributeError: 'list' object has no attribute 'total'
Today if I want to use the generator function I have to leave the per_page off and get them only 20 at a time; this makes it much slower.
Metadata
Metadata
Assignees
Labels
No labels