diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-07-28 12:54:46 +0200 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-07-28 07:41:36 -0700 |
commit | d9126cd802dd3cfe529fa940300113c4ead3054b (patch) | |
tree | 973e9029a685ce9dbc3ea1f3ba35b356d9f3562d /gitlab/v4/objects/statistics.py | |
parent | 005ba93074d391f818c39e46390723a0d0d16098 (diff) | |
download | gitlab-d9126cd802dd3cfe529fa940300113c4ead3054b.tar.gz |
fix: support array types for most resources
Diffstat (limited to 'gitlab/v4/objects/statistics.py')
-rw-r--r-- | gitlab/v4/objects/statistics.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gitlab/v4/objects/statistics.py b/gitlab/v4/objects/statistics.py index 3176674..1de963e 100644 --- a/gitlab/v4/objects/statistics.py +++ b/gitlab/v4/objects/statistics.py @@ -2,6 +2,7 @@ from typing import Any, cast from gitlab.base import RESTManager, RESTObject from gitlab.mixins import GetWithoutIdMixin, RefreshMixin +from gitlab.types import ArrayAttribute __all__ = [ "GroupIssuesStatistics", @@ -35,6 +36,8 @@ class IssuesStatistics(RefreshMixin, RESTObject): class IssuesStatisticsManager(GetWithoutIdMixin, RESTManager): _path = "/issues_statistics" _obj_cls = IssuesStatistics + _list_filters = ("iids",) + _types = {"iids": ArrayAttribute} def get(self, **kwargs: Any) -> IssuesStatistics: return cast(IssuesStatistics, super().get(**kwargs)) @@ -48,6 +51,8 @@ class GroupIssuesStatisticsManager(GetWithoutIdMixin, RESTManager): _path = "/groups/{group_id}/issues_statistics" _obj_cls = GroupIssuesStatistics _from_parent_attrs = {"group_id": "id"} + _list_filters = ("iids",) + _types = {"iids": ArrayAttribute} def get(self, **kwargs: Any) -> GroupIssuesStatistics: return cast(GroupIssuesStatistics, super().get(**kwargs)) @@ -61,6 +66,8 @@ class ProjectIssuesStatisticsManager(GetWithoutIdMixin, RESTManager): _path = "/projects/{project_id}/issues_statistics" _obj_cls = ProjectIssuesStatistics _from_parent_attrs = {"project_id": "id"} + _list_filters = ("iids",) + _types = {"iids": ArrayAttribute} def get(self, **kwargs: Any) -> ProjectIssuesStatistics: return cast(ProjectIssuesStatistics, super().get(**kwargs)) |