summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/appearance.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/v4/objects/appearance.py')
-rw-r--r--gitlab/v4/objects/appearance.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/gitlab/v4/objects/appearance.py b/gitlab/v4/objects/appearance.py
index a34398e..6a0c20a 100644
--- a/gitlab/v4/objects/appearance.py
+++ b/gitlab/v4/objects/appearance.py
@@ -1,3 +1,5 @@
+from typing import Any, cast, Dict, Optional, Union
+
from gitlab import exceptions as exc
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import GetWithoutIdMixin, SaveMixin, UpdateMixin
@@ -32,7 +34,12 @@ class ApplicationAppearanceManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
)
@exc.on_http_error(exc.GitlabUpdateError)
- def update(self, id=None, new_data=None, **kwargs):
+ def update(
+ self,
+ id: Optional[Union[str, int]] = None,
+ new_data: Dict[str, Any] = None,
+ **kwargs: Any
+ ) -> Dict[str, Any]:
"""Update an object on the server.
Args:
@@ -49,4 +56,9 @@ class ApplicationAppearanceManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
"""
new_data = new_data or {}
data = new_data.copy()
- super(ApplicationAppearanceManager, self).update(id, data, **kwargs)
+ return super(ApplicationAppearanceManager, self).update(id, data, **kwargs)
+
+ def get(
+ self, id: Optional[Union[int, str]] = None, **kwargs: Any
+ ) -> Optional[ApplicationAppearance]:
+ return cast(ApplicationAppearance, super().get(id=id, **kwargs))