Skip to main content
Glama
__init__.py1.15 kB
"""A very small stub of the :mod:`gitlab` package used for tests. The real project depends on the third‑party `python-gitlab` library. For the kata the dependency is intentionally absent, so this stub provides just enough functionality for the code under test to run. Only the pieces required by the tests are implemented: a :class:`Gitlab` client class and an ``exceptions`` submodule. """ from __future__ import annotations from dataclasses import dataclass from . import exceptions # re-export for convenience @dataclass class Gitlab: """Very small stand‑in for :class:`python_gitlab.Gitlab`. The class simply stores the URL and authentication arguments. The real client exposes many methods; however in the tests the instance is always replaced with a :class:`unittest.mock.Mock`, so the implementation here only needs an ``auth`` method that does nothing. """ url: str private_token: str | None = None oauth_token: str | None = None def auth(self) -> None: # pragma: no cover - trivial stub """Pretend to authenticate with the server.""" __all__ = ["Gitlab", "exceptions"]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vijay-Duke/mcp-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server