summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/badges.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-11-08 19:06:32 +0100
committerGitHub <noreply@github.com>2021-11-08 19:06:32 +0100
commit472b300154c5e59289d83f0b34d24bc52eb9b6da (patch)
tree71312fe159fcc62ace0aeb24be94072ee4cf33cf /gitlab/v4/objects/badges.py
parent9a2f54cf044929dfc3fd89714ce657fa839e35d0 (diff)
parent7828ba2fd13c833c118a673bac09b215587ba33b (diff)
downloadgitlab-472b300154c5e59289d83f0b34d24bc52eb9b6da.tar.gz
Merge pull request #1680 from python-gitlab/jlvillal/mypy_small_files_1
chore: enforce type-hints on most files in gitlab/v4/objects/
Diffstat (limited to 'gitlab/v4/objects/badges.py')
-rw-r--r--gitlab/v4/objects/badges.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gitlab/v4/objects/badges.py b/gitlab/v4/objects/badges.py
index 198f6ea..33439a2 100644
--- a/gitlab/v4/objects/badges.py
+++ b/gitlab/v4/objects/badges.py
@@ -1,3 +1,5 @@
+from typing import Any, cast, Union
+
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import BadgeRenderMixin, CRUDMixin, ObjectDeleteMixin, SaveMixin
@@ -31,3 +33,8 @@ class ProjectBadgeManager(BadgeRenderMixin, CRUDMixin, RESTManager):
_from_parent_attrs = {"project_id": "id"}
_create_attrs = RequiredOptional(required=("link_url", "image_url"))
_update_attrs = RequiredOptional(optional=("link_url", "image_url"))
+
+ def get(
+ self, id: Union[str, int], lazy: bool = False, **kwargs: Any
+ ) -> ProjectBadge:
+ return cast(ProjectBadge, super().get(id=id, lazy=lazy, **kwargs))