summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/boards.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-11-06 21:33:07 -0700
committerJohn L. Villalovos <john@sodarock.com>2021-11-08 07:21:17 -0800
commit7828ba2fd13c833c118a673bac09b215587ba33b (patch)
tree71312fe159fcc62ace0aeb24be94072ee4cf33cf /gitlab/v4/objects/boards.py
parent9a2f54cf044929dfc3fd89714ce657fa839e35d0 (diff)
downloadgitlab-7828ba2fd13c833c118a673bac09b215587ba33b.tar.gz
chore: enforce type-hints on most files in gitlab/v4/objects/jlvillal/mypy_small_files_1
* Add type-hints to some of the files in gitlab/v4/objects/ * Fix issues detected when adding type-hints * Changed mypy exclusion to explicitly list the 13 files that have not yet had type-hints added.
Diffstat (limited to 'gitlab/v4/objects/boards.py')
-rw-r--r--gitlab/v4/objects/boards.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/gitlab/v4/objects/boards.py b/gitlab/v4/objects/boards.py
index 8b2959d..f9dc8c2 100644
--- a/gitlab/v4/objects/boards.py
+++ b/gitlab/v4/objects/boards.py
@@ -1,3 +1,5 @@
+from typing import Any, cast, Union
+
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
@@ -24,6 +26,11 @@ class GroupBoardListManager(CRUDMixin, RESTManager):
_create_attrs = RequiredOptional(required=("label_id",))
_update_attrs = RequiredOptional(required=("position",))
+ def get(
+ self, id: Union[str, int], lazy: bool = False, **kwargs: Any
+ ) -> GroupBoardList:
+ return cast(GroupBoardList, super().get(id=id, lazy=lazy, **kwargs))
+
class GroupBoard(SaveMixin, ObjectDeleteMixin, RESTObject):
lists: GroupBoardListManager
@@ -35,6 +42,9 @@ class GroupBoardManager(CRUDMixin, RESTManager):
_from_parent_attrs = {"group_id": "id"}
_create_attrs = RequiredOptional(required=("name",))
+ def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> GroupBoard:
+ return cast(GroupBoard, super().get(id=id, lazy=lazy, **kwargs))
+
class ProjectBoardList(SaveMixin, ObjectDeleteMixin, RESTObject):
pass
@@ -47,6 +57,11 @@ class ProjectBoardListManager(CRUDMixin, RESTManager):
_create_attrs = RequiredOptional(required=("label_id",))
_update_attrs = RequiredOptional(required=("position",))
+ def get(
+ self, id: Union[str, int], lazy: bool = False, **kwargs: Any
+ ) -> ProjectBoardList:
+ return cast(ProjectBoardList, super().get(id=id, lazy=lazy, **kwargs))
+
class ProjectBoard(SaveMixin, ObjectDeleteMixin, RESTObject):
lists: ProjectBoardListManager
@@ -57,3 +72,8 @@ class ProjectBoardManager(CRUDMixin, RESTManager):
_obj_cls = ProjectBoard
_from_parent_attrs = {"project_id": "id"}
_create_attrs = RequiredOptional(required=("name",))
+
+ def get(
+ self, id: Union[str, int], lazy: bool = False, **kwargs: Any
+ ) -> ProjectBoard:
+ return cast(ProjectBoard, super().get(id=id, lazy=lazy, **kwargs))