@@ -39,21 +39,21 @@ class Gitlab(object):
3939"""Represents a GitLab server connection.
4040
4141 Args:
42- url (str) : The URL of the GitLab server (defaults to https://gitlab.com).
43- private_token (str) : The user private token
44- oauth_token (str) : An oauth token
45- job_token (str) : A CI job token
46- ssl_verify (bool|str) : Whether SSL certificates should be validated. If
42+ url: The URL of the GitLab server (defaults to https://gitlab.com).
43+ private_token: The user private token
44+ oauth_token: An oauth token
45+ job_token: A CI job token
46+ ssl_verify: Whether SSL certificates should be validated. If
4747 the value is a string, it is the path to a CA file used for
4848 certificate validation.
49- timeout (float) : Timeout to use for requests to the GitLab server.
50- http_username (str) : Username for HTTP authentication
51- http_password (str) : Password for HTTP authentication
52- api_version (str) : Gitlab API version to use (support for 4 only)
53- pagination (str) : Can be set to 'keyset' to use keyset pagination
54- order_by (str) : Set order_by globally
55- user_agent (str) : A custom user agent to use for making HTTP requests.
56- retry_transient_errors (bool) : Whether to retry after 500, 502, 503, or
49+ timeout: Timeout to use for requests to the GitLab server.
50+ http_username: Username for HTTP authentication
51+ http_password: Password for HTTP authentication
52+ api_version: Gitlab API version to use (support for 4 only)
53+ pagination: Can be set to 'keyset' to use keyset pagination
54+ order_by: Set order_by globally
55+ user_agent: A custom user agent to use for making HTTP requests.
56+ retry_transient_errors: Whether to retry after 500, 502, 503, or
5757 504 responses. Defaults to False.
5858 """
5959
@@ -225,11 +225,11 @@ def from_config(
225225"""Create a Gitlab connection from configuration files.
226226
227227 Args:
228- gitlab_id (str) : ID of the configuration section.
228+ gitlab_id: ID of the configuration section.
229229 config_files list[str]: List of paths to configuration files.
230230
231231 Returns:
232- (gitlab.Gitlab): A Gitlab connection.
232+ A Gitlab connection.
233233
234234 Raises:
235235 gitlab.config.GitlabDataError: If the configuration is not correct.
@@ -269,7 +269,7 @@ def version(self) -> Tuple[str, str]:
269269 object.
270270
271271 Returns:
272- tuple (str, str) : The server version and server revision.
272+ tuple: The server version and server revision.
273273 ('unknown', 'unknwown') if the server doesn't
274274 perform as expected.
275275 """
@@ -293,7 +293,7 @@ def lint(self, content: str, **kwargs: Any) -> Tuple[bool, List[str]]:
293293"""Validate a gitlab CI configuration.
294294
295295 Args:
296- content (txt) : The .gitlab-ci.yml content
296+ content: The .gitlab-ci.yml content
297297 **kwargs: Extra options to send to the server (e.g. sudo)
298298
299299 Raises:
@@ -317,11 +317,9 @@ def markdown(
317317"""Render an arbitrary Markdown document.
318318
319319 Args:
320- text (str): The markdown text to render
321- gfm (bool): Render text using GitLab Flavored Markdown. Default is
322- False
323- project (str): Full path of a project used a context when `gfm` is
324- True
320+ text: The markdown text to render
321+ gfm: Render text using GitLab Flavored Markdown. Default is False
322+ project: Full path of a project used a context when `gfm` is True
325323 **kwargs: Extra options to send to the server (e.g. sudo)
326324
327325 Raises:
@@ -363,7 +361,7 @@ def set_license(self, license: str, **kwargs: Any) -> Dict[str, Any]:
363361"""Add a new license.
364362
365363 Args:
366- license (str) : The license string
364+ license: The license string
367365 **kwargs: Extra options to send to the server (e.g. sudo)
368366
369367 Raises:
@@ -541,20 +539,19 @@ def http_request(
541539"""Make an HTTP request to the Gitlab server.
542540
543541 Args:
544- verb (str): The HTTP method to call ('get', 'post', 'put',
545- 'delete')
546- path (str): Path or full URL to query ('/projects' or
542+ verb: The HTTP method to call ('get', 'post', 'put', 'delete')
543+ path: Path or full URL to query ('/projects' or
547544 'http://whatever/v4/api/projecs')
548- query_data (dict) : Data to send as query parameters
549- post_data (dict|bytes) : Data to send in the body (will be converted to
545+ query_data: Data to send as query parameters
546+ post_data: Data to send in the body (will be converted to
550547 json by default)
551- raw (bool) : If True, do not convert post_data to json
552- streamed (bool) : Whether the data should be streamed
553- files (dict) : The files to send to the server
554- timeout (float) : The timeout, in seconds, for the request
555- obey_rate_limit (bool) : Whether to obey 429 Too Many Request
548+ raw: If True, do not convert post_data to json
549+ streamed: Whether the data should be streamed
550+ files: The files to send to the server
551+ timeout: The timeout, in seconds, for the request
552+ obey_rate_limit: Whether to obey 429 Too Many Request
556553 responses. Defaults to True.
557- max_retries (int) : Max retries after 429 or transient errors,
554+ max_retries: Max retries after 429 or transient errors,
558555 set to -1 to retry forever. Defaults to 10.
559556 **kwargs: Extra options to send to the server (e.g. sudo)
560557
@@ -667,11 +664,11 @@ def http_get(
667664"""Make a GET request to the Gitlab server.
668665
669666 Args:
670- path (str) : Path or full URL to query ('/projects' or
667+ path: Path or full URL to query ('/projects' or
671668 'http://whatever/v4/api/projecs')
672- query_data (dict) : Data to send as query parameters
673- streamed (bool) : Whether the data should be streamed
674- raw (bool) : If True do not try to parse the output as json
669+ query_data: Data to send as query parameters
670+ streamed: Whether the data should be streamed
671+ raw: If True do not try to parse the output as json
675672 **kwargs: Extra options to send to the server (e.g. sudo)
676673
677674 Returns:
@@ -712,9 +709,9 @@ def http_list(
712709"""Make a GET request to the Gitlab server for list-oriented queries.
713710
714711 Args:
715- path (str) : Path or full URL to query ('/projects' or
712+ path: Path or full URL to query ('/projects' or
716713 'http://whatever/v4/api/projects')
717- query_data (dict) : Data to send as query parameters
714+ query_data: Data to send as query parameters
718715 **kwargs: Extra options to send to the server (e.g. sudo, page,
719716 per_page)
720717
@@ -761,13 +758,13 @@ def http_post(
761758"""Make a POST request to the Gitlab server.
762759
763760 Args:
764- path (str) : Path or full URL to query ('/projects' or
761+ path: Path or full URL to query ('/projects' or
765762 'http://whatever/v4/api/projecs')
766- query_data (dict) : Data to send as query parameters
767- post_data (dict) : Data to send in the body (will be converted to
763+ query_data: Data to send as query parameters
764+ post_data: Data to send in the body (will be converted to
768765 json by default)
769- raw (bool) : If True, do not convert post_data to json
770- files (dict) : The files to send to the server
766+ raw: If True, do not convert post_data to json
767+ files: The files to send to the server
771768 **kwargs: Extra options to send to the server (e.g. sudo)
772769
773770 Returns:
@@ -810,13 +807,13 @@ def http_put(
810807"""Make a PUT request to the Gitlab server.
811808
812809 Args:
813- path (str) : Path or full URL to query ('/projects' or
810+ path: Path or full URL to query ('/projects' or
814811 'http://whatever/v4/api/projecs')
815- query_data (dict) : Data to send as query parameters
816- post_data (dict|bytes) : Data to send in the body (will be converted to
812+ query_data: Data to send as query parameters
813+ post_data: Data to send in the body (will be converted to
817814 json by default)
818- raw (bool) : If True, do not convert post_data to json
819- files (dict) : The files to send to the server
815+ raw: If True, do not convert post_data to json
816+ files: The files to send to the server
820817 **kwargs: Extra options to send to the server (e.g. sudo)
821818
822819 Returns:
@@ -849,7 +846,7 @@ def http_delete(self, path: str, **kwargs: Any) -> requests.Response:
849846"""Make a DELETE request to the Gitlab server.
850847
851848 Args:
852- path (str) : Path or full URL to query ('/projects' or
849+ path: Path or full URL to query ('/projects' or
853850 'http://whatever/v4/api/projecs')
854851 **kwargs: Extra options to send to the server (e.g. sudo)
855852
@@ -868,8 +865,8 @@ def search(
868865"""Search GitLab resources matching the provided string.'
869866
870867 Args:
871- scope (str) : Scope of the search
872- search (str) : Search string
868+ scope: Scope of the search
869+ search: Search string
873870 **kwargs: Extra options to send to the server (e.g. sudo)
874871
875872 Raises: