Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(client): introduceiterator=True and deprecateas_list=False inlist()#2032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intomainfromjlvillal/i_hate_as_list
May 29, 2022

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovosJohnVillalovos commentedMay 29, 2022
edited
Loading

as_list=False is confusing as it doesn't explain what is being
returned. Replace it withiterator=True which more clearly explains
to the user that an iterator/generator will be returned.

This maintains backward compatibility withas_list but does issue a
DeprecationWarning ifas_list is set.

@JohnVillalovosJohnVillalovos marked this pull request as draftMay 29, 2022 19:01
@JohnVillalovosJohnVillalovos marked this pull request as ready for reviewMay 29, 2022 19:07
@codecov-commenter
Copy link

Codecov Report

Merging#2032 (b4ae128) intomain (5ae18d0) willdecrease coverage by0.01%.
The diff coverage is85.71%.

@@            Coverage Diff             @@##             main    #2032      +/-   ##==========================================- Coverage   92.72%   92.71%   -0.02%==========================================  Files          78       78                Lines        4947     4953       +6     ==========================================+ Hits         4587     4592       +5- Misses        360      361       +1
FlagCoverage Δ
cli_func_v481.46% <35.71%> (-0.04%)⬇️
py_func_v480.37% <85.71%> (+<0.01%)⬆️
unit83.72% <35.71%> (-0.05%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/mixins.py91.75% <ø> (ø)
gitlab/v4/objects/ldap.py54.54% <ø> (ø)
gitlab/v4/objects/repositories.py83.07% <ø> (ø)
gitlab/v4/objects/runners.py98.27% <ø> (ø)
gitlab/v4/objects/users.py95.94% <ø> (ø)
gitlab/v4/objects/merge_requests.py84.78% <50.00%> (ø)
gitlab/client.py90.68% <87.50%> (-0.10%)⬇️
gitlab/v4/objects/milestones.py100.00% <100.00%> (ø)

Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good@JohnVillalovos just a few minor comments.

Context for future readers:
https://github.com/python-gitlab/python-gitlab/pull/1956/files#r884302316

… in `list()``as_list=False` is confusing as it doesn't explain what is beingreturned. Replace it with `iterator=True` which more clearly explainsto the user that an iterator/generator will be returned.This maintains backward compatibility with `as_list` but does issue aDeprecationWarning if `as_list` is set.
@JohnVillalovosJohnVillalovos changed the titlefix: inlist() changeas_list=False toiterator=Truefeat(client): introduceiterator=True and deprecateas_list=False inlist()May 29, 2022
Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks@JohnVillalovos, makes sense to me, also makes it consistent with the iterator arg on the upcoming streaming responses PR then.

@nejchnejchenabled auto-mergeMay 29, 2022 23:30
@nejchnejch merged commitc51b538 intomainMay 29, 2022
@nejchnejch deleted the jlvillal/i_hate_as_list branchMay 29, 2022 23:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@JohnVillalovos@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp