diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-06-13 23:47:11 +0200 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2021-06-14 14:32:13 -0700 |
commit | 8753add72061ea01c508a42d16a27388b1d92677 (patch) | |
tree | 0995bd008075957eeeee04a59b33c1371d79b070 /gitlab/v4/objects/projects.py | |
parent | e77554c18f87a24ea1367cf9e2e53c48ad6ce3e4 (diff) | |
download | gitlab-8753add72061ea01c508a42d16a27388b1d92677.tar.gz |
docs: make Gitlab class usable for intersphinx
Diffstat (limited to 'gitlab/v4/objects/projects.py')
-rw-r--r-- | gitlab/v4/objects/projects.py | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py index a5be66f..ee7aca8 100644 --- a/gitlab/v4/objects/projects.py +++ b/gitlab/v4/objects/projects.py @@ -838,12 +838,13 @@ class ProjectManager(CRUDMixin, RESTManager): This method will return when an import operation has been safely queued, or an error has occurred. After triggering an import, check the - `import_status` of the newly created project to detect when the import + ``import_status`` of the newly created project to detect when the import operation has completed. - NOTE: this request may take longer than most other API requests. - So this method will specify a 60 second default timeout if none is specified. - A timeout can be specified via kwargs to override this functionality. + .. note:: + This request may take longer than most other API requests. + So this method will specify a 60 second default timeout if none is specified. + A timeout can be specified via kwargs to override this functionality. Args: bitbucket_server_url (str): Bitbucket Server URL @@ -865,7 +866,9 @@ class ProjectManager(CRUDMixin, RESTManager): dict: A representation of the import status. Example: - ``` + + .. code-block:: python + gl = gitlab.Gitlab_from_config() print("Triggering import") result = gl.projects.import_bitbucket_server( @@ -883,7 +886,7 @@ class ProjectManager(CRUDMixin, RESTManager): time.sleep(1.0) project = gl.projects.get(project.id) print("BitBucket import complete") - ``` + """ data = { "bitbucket_server_url": bitbucket_server_url, @@ -923,12 +926,13 @@ class ProjectManager(CRUDMixin, RESTManager): This method will return when an import operation has been safely queued, or an error has occurred. After triggering an import, check the - `import_status` of the newly created project to detect when the import + ``import_status`` of the newly created project to detect when the import operation has completed. - NOTE: this request may take longer than most other API requests. - So this method will specify a 60 second default timeout if none is specified. - A timeout can be specified via kwargs to override this functionality. + .. note:: + This request may take longer than most other API requests. + So this method will specify a 60 second default timeout if none is specified. + A timeout can be specified via kwargs to override this functionality. Args: personal_access_token (str): GitHub personal access token @@ -945,7 +949,9 @@ class ProjectManager(CRUDMixin, RESTManager): dict: A representation of the import status. Example: - ``` + + .. code-block:: python + gl = gitlab.Gitlab_from_config() print("Triggering import") result = gl.projects.import_github(ACCESS_TOKEN, @@ -957,7 +963,7 @@ class ProjectManager(CRUDMixin, RESTManager): time.sleep(1.0) project = gl.projects.get(project.id) print("Github import complete") - ``` + """ data = { "personal_access_token": personal_access_token, |