FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: add a UserWarning if both `iterator=True` and `page=X` are used by JohnVillalovos · Pull Request #2462 · python-gitlab/python-gitlab · GitHub

Repository navigation

chore: add a UserWarning if both iterator=True and page=X are used - #2462

Merged
nejch merged 1 commit into
mainfrom
jlvillal/warn_incompatible
Jan 26, 2023
Merged

nejch merged 1 commit into
mainfrom
jlvillal/warn_incompatible

Conversation

Copy link
Copy Markdown
Member

If a caller calls a list() method with both iterator=True (or as_list=False) and page=X then emit a UserWarning as the options are mutually exclusive.

JohnVillalovos requested a review from nejch January 25, 2023 22:50
JohnVillalovos force-pushed the jlvillal/warn_incompatible branch from 8aed6c8 to 7159747 Compare January 25, 2023 22:50
JohnVillalovos changed the title chore: add a UserWarning if use both iteratore=True and page=X chore: add a UserWarning if use both iterator=True and page=X Jan 25, 2023
nejch changed the title chore: add a UserWarning if use both iterator=True and page=X chore: add a UserWarning if both iterator=True and page=X are used Jan 26, 2023

nejch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @JohnVillalovos just a little typo there!

Hopefully we can remove as_list for a major bump at some point and simplify these checks 😁

Comment thread gitlab/client.py Outdated
If a caller calls a `list()` method with both `iterator=True` (or
`as_list=False`) and `page=X` then emit a `UserWarning` as the options
are mutually exclusive.
JohnVillalovos force-pushed the jlvillal/warn_incompatible branch from 7159747 to bec4f6a Compare January 26, 2023 15:14
nejch merged commit 8e85791 into main Jan 26, 2023
nejch deleted the jlvillal/warn_incompatible branch January 26, 2023 16:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL