summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/namespaces.py
blob: 1271a1aa03eb4495b240356bfe7143db6f4e4c56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from typing import Any, cast, Union

from ...base import RESTManager, RESTObject
from ...mixins import RetrieveMixin

__all__ = [
    "Namespace",
    "NamespaceManager",
]


class Namespace(RESTObject):
    pass


class NamespaceManager(RetrieveMixin, RESTManager):
    _path = "/namespaces"
    _obj_cls = Namespace
    _list_filters = ("search",)

    def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> Namespace:
        return cast(Namespace, super().get(id=id, lazy=lazy, **kwargs))