Skip to content

refs call of commit causes wrong warning #2799

Closed
@cweber-dbs

Description

@cweber-dbs

Description of the problem, including code/CLI snippet

Fetching the refs for a commit causes a warning. The warning is missleading due to the fact, that it provides some information for the list() method.

    def _fetch_commit_tag(self, commit: ProjectCommit) -> str:
        tags = commit.refs(type="tag")

Expected Behavior

The warning should inform about the refs() method and not the list() method.

Actual Behavior

The following warning is shown:

UserWarning: Calling a list() method without specifying get_all=True or iterator=True will return a maximum of 20 items. Your query returned 20 of xxx items. See https://python-gitlab.readthedocs.io/en/v4.4.0/api-usage.html#pagination for more details. If this was done intentionally, then this warning can be supressed by adding the argumentget_all=Falseto thelist()call.

Specifications

python-gitlab version: 4.4.0
API version you are using (v3/v4): ?
Gitlab server version (or gitlab.com): v16.8.1-ee

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions