Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Typing overloads for http_list and its callers #3131

Open
@nejch

Description

@nejch

To finish the list / terator typing situation if possible before the next release, we could also add overloading to http_list and potentially its callers in our code (or migrate those to a full manager with a listmixin).

We currently still have over 20 occurrences, though maybe some of them could be refactored into a normal list:

~/repos/python-gitlab$ grep '\.http_list(' -r gitlab/v4
gitlab/v4/objects/files.py:        result = self.gitlab.http_list(path, query_data, **kwargs)
gitlab/v4/objects/runners.py:        obj = self.gitlab.http_list(path, query_data, **kwargs)
gitlab/v4/objects/geo_nodes.py:        result = self.gitlab.http_list("/geo_nodes/status", **kwargs)
gitlab/v4/objects/geo_nodes.py:        result = self.gitlab.http_list("/geo_nodes/current/failures", **kwargs)
gitlab/v4/objects/commits.py:        return self.manager.gitlab.http_list(path, **kwargs)
gitlab/v4/objects/commits.py:        return self.manager.gitlab.http_list(path, query_data=query_data, **kwargs)
gitlab/v4/objects/commits.py:        return self.manager.gitlab.http_list(path, **kwargs)
gitlab/v4/objects/merge_requests.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/merge_requests.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/merge_requests.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/milestones.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/milestones.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/milestones.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/milestones.py:        data_list = self.manager.gitlab.http_list(path, iterator=True, **kwargs)
gitlab/v4/objects/repositories.py:        return self.manager.gitlab.http_list(gl_path, query_data=query_data, **kwargs)
gitlab/v4/objects/repositories.py:        return self.manager.gitlab.http_list(path, **kwargs)
gitlab/v4/objects/ldap.py:        obj = self.gitlab.http_list(path, **data)
gitlab/v4/objects/groups.py:        return self.manager.gitlab.http_list(path, query_data=data, **kwargs)
gitlab/v4/objects/issues.py:        result = self.manager.gitlab.http_list(path, **kwargs)
gitlab/v4/objects/issues.py:        result = self.manager.gitlab.http_list(path, **kwargs)
gitlab/v4/objects/projects.py:        return self.manager.gitlab.http_list(path, query_data=data, **kwargs)

/cc @JohnVillalovos @igorp-collabora just FYI, as I saw we still have #2338.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions