summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/statistics.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-05-30 10:09:43 -0700
committerJohn L. Villalovos <john@sodarock.com>2022-05-30 10:09:43 -0700
commitaa972d49c57f2ebc983d2de1cfb8d18924af6734 (patch)
treeef4fd32c6bc37c68d2fe60c7bfbc3f137b54e0e2 /gitlab/v4/objects/statistics.py
parentb2e6f3bc0dd6d8a7da39939850689a3677eb2444 (diff)
downloadgitlab-aa972d49c57f2ebc983d2de1cfb8d18924af6734.tar.gz
chore: update type-hints return signature for GetWithoutIdMixin methods
Commit f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 removed situation where `get()` in a `GetWithoutIdMixin` based class could return `None` Update the type-hints to no longer return `Optional` AKA `None`
Diffstat (limited to 'gitlab/v4/objects/statistics.py')
-rw-r--r--gitlab/v4/objects/statistics.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gitlab/v4/objects/statistics.py b/gitlab/v4/objects/statistics.py
index 2941f91..24c17a5 100644
--- a/gitlab/v4/objects/statistics.py
+++ b/gitlab/v4/objects/statistics.py
@@ -26,8 +26,8 @@ class ProjectAdditionalStatisticsManager(GetWithoutIdMixin, RESTManager):
def get(
self, id: Optional[Union[int, str]] = None, **kwargs: Any
- ) -> Optional[ProjectAdditionalStatistics]:
- return cast(Optional[ProjectAdditionalStatistics], super().get(id=id, **kwargs))
+ ) -> ProjectAdditionalStatistics:
+ return cast(ProjectAdditionalStatistics, super().get(id=id, **kwargs))
class IssuesStatistics(RefreshMixin, RESTObject):
@@ -40,8 +40,8 @@ class IssuesStatisticsManager(GetWithoutIdMixin, RESTManager):
def get(
self, id: Optional[Union[int, str]] = None, **kwargs: Any
- ) -> Optional[IssuesStatistics]:
- return cast(Optional[IssuesStatistics], super().get(id=id, **kwargs))
+ ) -> IssuesStatistics:
+ return cast(IssuesStatistics, super().get(id=id, **kwargs))
class GroupIssuesStatistics(RefreshMixin, RESTObject):
@@ -55,8 +55,8 @@ class GroupIssuesStatisticsManager(GetWithoutIdMixin, RESTManager):
def get(
self, id: Optional[Union[int, str]] = None, **kwargs: Any
- ) -> Optional[GroupIssuesStatistics]:
- return cast(Optional[GroupIssuesStatistics], super().get(id=id, **kwargs))
+ ) -> GroupIssuesStatistics:
+ return cast(GroupIssuesStatistics, super().get(id=id, **kwargs))
class ProjectIssuesStatistics(RefreshMixin, RESTObject):
@@ -70,5 +70,5 @@ class ProjectIssuesStatisticsManager(GetWithoutIdMixin, RESTManager):
def get(
self, id: Optional[Union[int, str]] = None, **kwargs: Any
- ) -> Optional[ProjectIssuesStatistics]:
- return cast(Optional[ProjectIssuesStatistics], super().get(id=id, **kwargs))
+ ) -> ProjectIssuesStatistics:
+ return cast(ProjectIssuesStatistics, super().get(id=id, **kwargs))