summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gitlab/client.py22
-rw-r--r--gitlab/mixins.py24
-rw-r--r--gitlab/v4/objects/appearance.py2
-rw-r--r--gitlab/v4/objects/clusters.py8
-rw-r--r--gitlab/v4/objects/commits.py14
-rw-r--r--gitlab/v4/objects/epics.py4
-rw-r--r--gitlab/v4/objects/features.py2
-rw-r--r--gitlab/v4/objects/files.py8
-rw-r--r--gitlab/v4/objects/geo_nodes.py6
-rw-r--r--gitlab/v4/objects/groups.py4
-rw-r--r--gitlab/v4/objects/issues.py6
-rw-r--r--gitlab/v4/objects/jobs.py6
-rw-r--r--gitlab/v4/objects/ldap.py2
-rw-r--r--gitlab/v4/objects/merge_request_approvals.py4
-rw-r--r--gitlab/v4/objects/merge_requests.py6
-rw-r--r--gitlab/v4/objects/milestones.py8
-rw-r--r--gitlab/v4/objects/packages.py4
-rw-r--r--gitlab/v4/objects/pipelines.py2
-rw-r--r--gitlab/v4/objects/projects.py18
-rw-r--r--gitlab/v4/objects/repositories.py12
-rw-r--r--gitlab/v4/objects/services.py6
-rw-r--r--gitlab/v4/objects/settings.py2
-rw-r--r--gitlab/v4/objects/sidekiq.py8
-rw-r--r--gitlab/v4/objects/snippets.py6
-rw-r--r--gitlab/v4/objects/todos.py2
-rw-r--r--gitlab/v4/objects/users.py14
26 files changed, 99 insertions, 101 deletions
diff --git a/gitlab/client.py b/gitlab/client.py
index 630b6d5..0dd4a6d 100644
--- a/gitlab/client.py
+++ b/gitlab/client.py
@@ -269,9 +269,8 @@ class Gitlab(object):
object.
Returns:
- tuple: The server version and server revision.
- ('unknown', 'unknwown') if the server doesn't
- perform as expected.
+ The server version and server revision.
+ ('unknown', 'unknown') if the server doesn't perform as expected.
"""
if self._server_version is None:
try:
@@ -301,8 +300,7 @@ class Gitlab(object):
GitlabVerifyError: If the validation could not be done
Returns:
- tuple: (True, []) if the file is valid, (False, errors(list))
- otherwise
+ (True, []) if the file is valid, (False, errors(list)) otherwise
"""
post_data = {"content": content}
data = self.http_post("/ci/lint", post_data=post_data, **kwargs)
@@ -327,7 +325,7 @@ class Gitlab(object):
GitlabMarkdownError: If the server cannot perform the request
Returns:
- str: The HTML rendering of the markdown text.
+ The HTML rendering of the markdown text.
"""
post_data = {"text": text, "gfm": gfm}
if project is not None:
@@ -349,7 +347,7 @@ class Gitlab(object):
GitlabGetError: If the server cannot perform the request
Returns:
- dict: The current license information
+ The current license information
"""
result = self.http_get("/license", **kwargs)
if isinstance(result, dict):
@@ -369,7 +367,7 @@ class Gitlab(object):
GitlabPostError: If the server cannot perform the request
Returns:
- dict: The new license information
+ The new license information
"""
data = {"license": license}
result = self.http_post("/license", post_data=data, **kwargs)
@@ -444,7 +442,7 @@ class Gitlab(object):
"""Return the base URL with the trailing slash stripped.
If the URL is a Falsy value, return the default URL.
Returns:
- str: The base URL
+ The base URL
"""
if not url:
return gitlab.const.DEFAULT_URL
@@ -458,7 +456,7 @@ class Gitlab(object):
it to the stored url.
Returns:
- str: The full URL
+ The full URL
"""
if path.startswith("http://") or path.startswith("https://"):
return path
@@ -716,7 +714,7 @@ class Gitlab(object):
per_page)
Returns:
- list: A list of the objects returned by the server. If `as_list` is
+ A list of the objects returned by the server. If `as_list` is
False and no pagination-related arguments (`page`, `per_page`,
`all`) are defined then a GitlabList object (generator) is returned
instead. This object will make API calls when needed to fetch the
@@ -874,7 +872,7 @@ class Gitlab(object):
GitlabSearchError: If the server failed to perform the request
Returns:
- GitlabList: A list of dicts describing the resources found.
+ A list of dicts describing the resources found.
"""
data = {"scope": scope, "search": search}
return self.http_list("/search", query_data=data, **kwargs)
diff --git a/gitlab/mixins.py b/gitlab/mixins.py
index 2e93543..f6b7e0b 100644
--- a/gitlab/mixins.py
+++ b/gitlab/mixins.py
@@ -93,7 +93,7 @@ class GetMixin(_RestManagerBase):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- object: The generated RESTObject.
+ The generated RESTObject.
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -134,7 +134,7 @@ class GetWithoutIdMixin(_RestManagerBase):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- object: The generated RESTObject
+ The generated RESTObject
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -207,7 +207,7 @@ class ListMixin(_RestManagerBase):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- list: The list of objects, or a generator if `as_list` is False
+ The list of objects, or a generator if `as_list` is False
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -287,7 +287,7 @@ class CreateMixin(_RestManagerBase):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- RESTObject: a new instance of the managed object class built with
+ A new instance of the managed object class built with
the data sent by the server
Raises:
@@ -357,7 +357,7 @@ class UpdateMixin(_RestManagerBase):
"""Return the HTTP method to use.
Returns:
- object: http_put (default) or http_post
+ http_put (default) or http_post
"""
if self._update_uses_post:
http_method = self.gitlab.http_post
@@ -380,7 +380,7 @@ class UpdateMixin(_RestManagerBase):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -442,7 +442,7 @@ class SetMixin(_RestManagerBase):
GitlabSetError: If an error occurred
Returns:
- obj: The created/updated attribute
+ The created/updated attribute
"""
path = f"{self.path}/{utils.clean_str_id(key)}"
data = {"value": value}
@@ -672,7 +672,7 @@ class DownloadMixin(_RestObjectBase):
GitlabGetError: If the server failed to perform the request
Returns:
- str: The blob content if streamed is False, None otherwise
+ The blob content if streamed is False, None otherwise
"""
path = f"{self.manager.path}/download"
result = self.manager.gitlab.http_get(
@@ -890,7 +890,7 @@ class ParticipantsMixin(_RestObjectBase):
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: The list of participants
+ The list of participants
"""
path = f"{self.manager.path}/{self.get_id()}/participants"
@@ -918,7 +918,7 @@ class BadgeRenderMixin(_RestManagerBase):
GitlabRenderError: If the rendering failed
Returns:
- dict: The rendering properties
+ The rendering properties
"""
path = f"{self.path}/render"
data = {"link_url": link_url, "image_url": image_url}
@@ -943,7 +943,7 @@ class PromoteMixin(_RestObjectBase):
"""Return the HTTP method to use.
Returns:
- object: http_put (default) or http_post
+ http_put (default) or http_post
"""
if self._update_uses_post:
http_method = self.manager.gitlab.http_post
@@ -964,7 +964,7 @@ class PromoteMixin(_RestObjectBase):
GitlabParsingError: If the json data could not be parsed
Returns:
- dict: The updated object data (*not* a RESTObject)
+ The updated object data (*not* a RESTObject)
"""
path = f"{self.manager.path}/{self.id}/promote"
diff --git a/gitlab/v4/objects/appearance.py b/gitlab/v4/objects/appearance.py
index 6a0c20a..0639c13 100644
--- a/gitlab/v4/objects/appearance.py
+++ b/gitlab/v4/objects/appearance.py
@@ -48,7 +48,7 @@ class ApplicationAppearanceManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
Raises:
GitlabAuthenticationError: If authentication is not correct
diff --git a/gitlab/v4/objects/clusters.py b/gitlab/v4/objects/clusters.py
index e4146df..dc02ee0 100644
--- a/gitlab/v4/objects/clusters.py
+++ b/gitlab/v4/objects/clusters.py
@@ -51,8 +51,8 @@ class GroupClusterManager(CRUDMixin, RESTManager):
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the manage object class build with
- the data sent by the server
+ A new instance of the manage object class build with
+ the data sent by the server
"""
path = f"{self.path}/user"
return cast(GroupCluster, CreateMixin.create(self, data, path=path, **kwargs))
@@ -102,8 +102,8 @@ class ProjectClusterManager(CRUDMixin, RESTManager):
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the manage object class build with
- the data sent by the server
+ A new instance of the manage object class build with
+ the data sent by the server
"""
path = f"{self.path}/user"
return cast(ProjectCluster, CreateMixin.create(self, data, path=path, **kwargs))
diff --git a/gitlab/v4/objects/commits.py b/gitlab/v4/objects/commits.py
index 20c4092..30db0de 100644
--- a/gitlab/v4/objects/commits.py
+++ b/gitlab/v4/objects/commits.py
@@ -39,7 +39,7 @@ class ProjectCommit(RESTObject):
GitlabGetError: If the diff could not be retrieved
Returns:
- list: The changes done in this commit
+ The changes done in this commit
"""
path = f"{self.manager.path}/{self.get_id()}/diff"
return self.manager.gitlab.http_get(path, **kwargs)
@@ -77,7 +77,7 @@ class ProjectCommit(RESTObject):
GitlabGetError: If the references could not be retrieved
Returns:
- list: The references the commit is pushed to.
+ The references the commit is pushed to.
"""
path = f"{self.manager.path}/{self.get_id()}/refs"
data = {"type": type}
@@ -96,7 +96,7 @@ class ProjectCommit(RESTObject):
GitlabGetError: If the references could not be retrieved
Returns:
- list: The merge requests related to the commit.
+ The merge requests related to the commit.
"""
path = f"{self.manager.path}/{self.get_id()}/merge_requests"
return self.manager.gitlab.http_get(path, **kwargs)
@@ -117,7 +117,7 @@ class ProjectCommit(RESTObject):
GitlabRevertError: If the revert could not be performed
Returns:
- dict: The new commit data (*not* a RESTObject)
+ The new commit data (*not* a RESTObject)
"""
path = f"{self.manager.path}/{self.get_id()}/revert"
post_data = {"branch": branch}
@@ -136,7 +136,7 @@ class ProjectCommit(RESTObject):
GitlabGetError: If the signature could not be retrieved
Returns:
- dict: The commit's signature data
+ The commit's signature data
"""
path = f"{self.manager.path}/{self.get_id()}/signature"
return self.manager.gitlab.http_get(path, **kwargs)
@@ -201,8 +201,8 @@ class ProjectCommitStatusManager(ListMixin, CreateMixin, RESTManager):
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the manage object class build with
- the data sent by the server
+ A new instance of the manage object class build with
+ the data sent by the server
"""
# project_id and commit_id are in the data dict when using the CLI, but
# they are missing when using only the API
diff --git a/gitlab/v4/objects/epics.py b/gitlab/v4/objects/epics.py
index 5161540..999c45f 100644
--- a/gitlab/v4/objects/epics.py
+++ b/gitlab/v4/objects/epics.py
@@ -101,8 +101,8 @@ class GroupEpicIssueManager(
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the manage object class build with
- the data sent by the server
+ A new instance of the manage object class build with
+ the data sent by the server
"""
if TYPE_CHECKING:
assert data is not None
diff --git a/gitlab/v4/objects/features.py b/gitlab/v4/objects/features.py
index 4f676c4..2e92596 100644
--- a/gitlab/v4/objects/features.py
+++ b/gitlab/v4/objects/features.py
@@ -50,7 +50,7 @@ class FeatureManager(ListMixin, DeleteMixin, RESTManager):
GitlabSetError: If an error occurred
Returns:
- obj: The created/updated attribute
+ The created/updated attribute
"""
path = f"{self.path}/{name.replace('/', '%2F')}"
data = {
diff --git a/gitlab/v4/objects/files.py b/gitlab/v4/objects/files.py
index 73a69ea..c3a8ec8 100644
--- a/gitlab/v4/objects/files.py
+++ b/gitlab/v4/objects/files.py
@@ -111,7 +111,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
GitlabGetError: If the file could not be retrieved
Returns:
- object: The generated RESTObject
+ The generated RESTObject
"""
return cast(ProjectFile, GetMixin.get(self, file_path, ref=ref, **kwargs))
@@ -132,7 +132,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- RESTObject: a new instance of the managed object class built with
+ a new instance of the managed object class built with
the data sent by the server
Raises:
@@ -165,7 +165,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -236,7 +236,7 @@ class ProjectFileManager(GetMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTMa
GitlabGetError: If the file could not be retrieved
Returns:
- str: The file content
+ The file content
"""
file_path = file_path.replace("/", "%2F").replace(".", "%2E")
path = f"{self.path}/{file_path}/raw"
diff --git a/gitlab/v4/objects/geo_nodes.py b/gitlab/v4/objects/geo_nodes.py
index 7fffb63..ebeb0d6 100644
--- a/gitlab/v4/objects/geo_nodes.py
+++ b/gitlab/v4/objects/geo_nodes.py
@@ -49,7 +49,7 @@ class GeoNode(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabGetError: If the server failed to perform the request
Returns:
- dict: The status of the geo node
+ The status of the geo node
"""
path = f"/geo_nodes/{self.get_id()}/status"
result = self.manager.gitlab.http_get(path, **kwargs)
@@ -81,7 +81,7 @@ class GeoNodeManager(RetrieveMixin, UpdateMixin, DeleteMixin, RESTManager):
GitlabGetError: If the server failed to perform the request
Returns:
- list: The status of all the geo nodes
+ The status of all the geo nodes
"""
result = self.gitlab.http_list("/geo_nodes/status", **kwargs)
if TYPE_CHECKING:
@@ -101,7 +101,7 @@ class GeoNodeManager(RetrieveMixin, UpdateMixin, DeleteMixin, RESTManager):
GitlabGetError: If the server failed to perform the request
Returns:
- list: The list of failures
+ The list of failures
"""
result = self.gitlab.http_list("/geo_nodes/current/failures", **kwargs)
if TYPE_CHECKING:
diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py
index 33b5c59..7479cfb 100644
--- a/gitlab/v4/objects/groups.py
+++ b/gitlab/v4/objects/groups.py
@@ -110,7 +110,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabSearchError: If the server failed to perform the request
Returns:
- GitlabList: A list of dicts describing the resources found.
+ A list of dicts describing the resources found.
"""
data = {"scope": scope, "search": search}
path = f"/groups/{self.get_id()}/search"
@@ -319,7 +319,7 @@ class GroupManager(CRUDMixin, RESTManager):
GitlabImportError: If the server failed to perform the request
Returns:
- dict: A representation of the import status.
+ A representation of the import status.
"""
files = {"file": ("file.tar.gz", file, "application/octet-stream")}
data = {"path": path, "name": name}
diff --git a/gitlab/v4/objects/issues.py b/gitlab/v4/objects/issues.py
index fe8d341..5a99a09 100644
--- a/gitlab/v4/objects/issues.py
+++ b/gitlab/v4/objects/issues.py
@@ -152,7 +152,7 @@ class ProjectIssue(
GitlabGetErrot: If the merge requests could not be retrieved
Returns:
- list: The list of merge requests.
+ The list of merge requests.
"""
path = f"{self.manager.path}/{self.get_id()}/related_merge_requests"
result = self.manager.gitlab.http_get(path, **kwargs)
@@ -173,7 +173,7 @@ class ProjectIssue(
GitlabGetErrot: If the merge requests could not be retrieved
Returns:
- list: The list of merge requests.
+ The list of merge requests.
"""
path = f"{self.manager.path}/{self.get_id()}/closed_by"
result = self.manager.gitlab.http_get(path, **kwargs)
@@ -265,7 +265,7 @@ class ProjectIssueLinkManager(ListMixin, CreateMixin, DeleteMixin, RESTManager):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- RESTObject, RESTObject: The source and target issues
+ The source and target issues
Raises:
GitlabAuthenticationError: If authentication is not correct
diff --git a/gitlab/v4/objects/jobs.py b/gitlab/v4/objects/jobs.py
index 426343d..be06f86 100644
--- a/gitlab/v4/objects/jobs.py
+++ b/gitlab/v4/objects/jobs.py
@@ -136,7 +136,7 @@ class ProjectJob(RefreshMixin, RESTObject):
GitlabGetError: If the artifacts could not be retrieved
Returns:
- bytes: The artifacts if `streamed` is False, None otherwise.
+ The artifacts if `streamed` is False, None otherwise.
"""
path = f"{self.manager.path}/{self.get_id()}/artifacts"
result = self.manager.gitlab.http_get(
@@ -173,7 +173,7 @@ class ProjectJob(RefreshMixin, RESTObject):
GitlabGetError: If the artifacts could not be retrieved
Returns:
- bytes: The artifacts if `streamed` is False, None otherwise.
+ The artifacts if `streamed` is False, None otherwise.
"""
path = f"{self.manager.path}/{self.get_id()}/artifacts/{path}"
result = self.manager.gitlab.http_get(
@@ -208,7 +208,7 @@ class ProjectJob(RefreshMixin, RESTObject):
GitlabGetError: If the artifacts could not be retrieved
Returns:
- str: The trace
+ The trace
"""
path = f"{self.manager.path}/{self.get_id()}/trace"
result = self.manager.gitlab.http_get(
diff --git a/gitlab/v4/objects/ldap.py b/gitlab/v4/objects/ldap.py
index 44d766e..10667b4 100644
--- a/gitlab/v4/objects/ldap.py
+++ b/gitlab/v4/objects/ldap.py
@@ -31,7 +31,7 @@ class LDAPGroupManager(RESTManager):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- list: The list of objects, or a generator if `as_list` is False
+ The list of objects, or a generator if `as_list` is False
Raises:
GitlabAuthenticationError: If authentication is not correct
diff --git a/gitlab/v4/objects/merge_request_approvals.py b/gitlab/v4/objects/merge_request_approvals.py
index 7892aee..0882edc 100644
--- a/gitlab/v4/objects/merge_request_approvals.py
+++ b/gitlab/v4/objects/merge_request_approvals.py
@@ -221,8 +221,8 @@ class ProjectMergeRequestApprovalRuleManager(
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the manage object class build with
- the data sent by the server
+ A new instance of the manage object class build with
+ the data sent by the server
"""
if TYPE_CHECKING:
assert data is not None
diff --git a/gitlab/v4/objects/merge_requests.py b/gitlab/v4/objects/merge_requests.py
index d75ccc8..bede4bd 100644
--- a/gitlab/v4/objects/merge_requests.py
+++ b/gitlab/v4/objects/merge_requests.py
@@ -208,7 +208,7 @@ class ProjectMergeRequest(
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: List of issues
+ List of issues
"""
path = f"{self.manager.path}/{self.get_id()}/closes_issues"
data_list = self.manager.gitlab.http_list(path, as_list=False, **kwargs)
@@ -235,7 +235,7 @@ class ProjectMergeRequest(
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: The list of commits
+ The list of commits
"""
path = f"{self.manager.path}/{self.get_id()}/commits"
@@ -258,7 +258,7 @@ class ProjectMergeRequest(
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: List of changes
+ List of changes
"""
path = f"{self.manager.path}/{self.get_id()}/changes"
return self.manager.gitlab.http_get(path, **kwargs)
diff --git a/gitlab/v4/objects/milestones.py b/gitlab/v4/objects/milestones.py
index a0554ea..a1e48a5 100644
--- a/gitlab/v4/objects/milestones.py
+++ b/gitlab/v4/objects/milestones.py
@@ -42,7 +42,7 @@ class GroupMilestone(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: The list of issues
+ The list of issues
"""
path = f"{self.manager.path}/{self.get_id()}/issues"
@@ -71,7 +71,7 @@ class GroupMilestone(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: The list of merge requests
+ The list of merge requests
"""
path = f"{self.manager.path}/{self.get_id()}/merge_requests"
data_list = self.manager.gitlab.http_list(path, as_list=False, **kwargs)
@@ -123,7 +123,7 @@ class ProjectMilestone(PromoteMixin, SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: The list of issues
+ The list of issues
"""
path = f"{self.manager.path}/{self.get_id()}/issues"
@@ -152,7 +152,7 @@ class ProjectMilestone(PromoteMixin, SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: The list of merge requests
+ The list of merge requests
"""
path = f"{self.manager.path}/{self.get_id()}/merge_requests"
data_list = self.manager.gitlab.http_list(path, as_list=False, **kwargs)
diff --git a/gitlab/v4/objects/packages.py b/gitlab/v4/objects/packages.py
index 600a7a6..2313f3e 100644
--- a/gitlab/v4/objects/packages.py
+++ b/gitlab/v4/objects/packages.py
@@ -65,7 +65,7 @@ class GenericPackageManager(RESTManager):
GitlabUploadError: If ``filepath`` cannot be read
Returns:
- GenericPackage: An object storing the metadata of the uploaded package.
+ An object storing the metadata of the uploaded package.
https://docs.gitlab.com/ee/user/packages/generic_packages/
"""
@@ -126,7 +126,7 @@ class GenericPackageManager(RESTManager):
GitlabGetError: If the server failed to perform the request
Returns:
- str: The package content if streamed is False, None otherwise
+ The package content if streamed is False, None otherwise
"""
path = f"{self._computed_path}/{package_name}/{package_version}/{file_name}"
result = self.gitlab.http_get(path, streamed=streamed, raw=True, **kwargs)
diff --git a/gitlab/v4/objects/pipelines.py b/gitlab/v4/objects/pipelines.py
index 4d04e85..fd597da 100644
--- a/gitlab/v4/objects/pipelines.py
+++ b/gitlab/v4/objects/pipelines.py
@@ -122,7 +122,7 @@ class ProjectPipelineManager(RetrieveMixin, CreateMixin, DeleteMixin, RESTManage
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the managed object class build with
+ A new instance of the managed object class build with
the data sent by the server
"""
if TYPE_CHECKING:
diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py
index 0f4a0ec..3c26935 100644
--- a/gitlab/v4/objects/projects.py
+++ b/gitlab/v4/objects/projects.py
@@ -426,7 +426,7 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO
specified
Returns:
- dict: A ``dict`` with the keys:
+ A ``dict`` with the keys:
* ``alt`` - The alternate text for the upload
* ``url`` - The direct url to the uploaded file
* ``markdown`` - Markdown for the uploaded file
@@ -476,7 +476,7 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO
GitlabGetError: If the content could not be retrieved
Returns:
- str: The uncompressed tar archive of the repository
+ The uncompressed tar archive of the repository
"""
path = f"/projects/{self.get_id()}/snapshot"
result = self.manager.gitlab.http_get(
@@ -503,7 +503,7 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO
GitlabSearchError: If the server failed to perform the request
Returns:
- GitlabList: A list of dicts describing the resources found.
+ A list of dicts describing the resources found.
"""
data = {"scope": scope, "search": search}
path = f"/projects/{self.get_id()}/search"
@@ -575,7 +575,7 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO
GitlabGetError: If the artifacts could not be retrieved
Returns:
- str: The artifacts if `streamed` is False, None otherwise.
+ The artifacts if `streamed` is False, None otherwise.
"""
path = f"/projects/{self.get_id()}/jobs/artifacts/{ref_name}/download"
result = self.manager.gitlab.http_get(
@@ -616,7 +616,7 @@ class Project(RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, RESTO
GitlabGetError: If the artifacts could not be retrieved
Returns:
- str: The artifacts if `streamed` is False, None otherwise.
+ The artifacts if `streamed` is False, None otherwise.
"""
path = f"/projects/{self.get_id()}/jobs/artifacts/{ref_name}/raw/{artifact_path}?job={job}"
@@ -822,7 +822,7 @@ class ProjectManager(CRUDMixin, RESTManager):
GitlabListError: If the server failed to perform the request
Returns:
- dict: A representation of the import status.
+ A representation of the import status.
"""
files = {"file": ("file.tar.gz", file, "application/octet-stream")}
data = {"path": path, "overwrite": str(overwrite)}
@@ -877,7 +877,7 @@ class ProjectManager(CRUDMixin, RESTManager):
GitlabListError: If the server failed to perform the request
Returns:
- dict: A representation of the import status.
+ A representation of the import status.
Example:
@@ -960,7 +960,7 @@ class ProjectManager(CRUDMixin, RESTManager):
GitlabListError: If the server failed to perform the request
Returns:
- dict: A representation of the import status.
+ A representation of the import status.
Example:
@@ -1040,7 +1040,7 @@ class ProjectForkManager(CreateMixin, ListMixin, RESTManager):
GitlabCreateError: If the server cannot perform the request
Returns:
- RESTObject: A new instance of the managed object class build with
+ A new instance of the managed object class build with
the data sent by the server
"""
if TYPE_CHECKING:
diff --git a/gitlab/v4/objects/repositories.py b/gitlab/v4/objects/repositories.py
index ca05150..e7e434d 100644
--- a/gitlab/v4/objects/repositories.py
+++ b/gitlab/v4/objects/repositories.py
@@ -69,7 +69,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabGetError: If the server failed to perform the request
Returns:
- list: The representation of the tree
+ The representation of the tree
"""
gl_path = f"/projects/{self.get_id()}/repository/tree"
query_data: Dict[str, Any] = {"recursive": recursive}
@@ -95,7 +95,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabGetError: If the server failed to perform the request
Returns:
- dict: The blob content and metadata
+ The blob content and metadata
"""
path = f"/projects/{self.get_id()}/repository/blobs/{sha}"
@@ -128,7 +128,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabGetError: If the server failed to perform the request
Returns:
- str: The blob content if streamed is False, None otherwise
+ The blob content if streamed is False, None otherwise
"""
path = f"/projects/{self.get_id()}/repository/blobs/{sha}/raw"
result = self.manager.gitlab.http_get(
@@ -155,7 +155,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabGetError: If the server failed to perform the request
Returns:
- str: The diff
+ The diff
"""
path = f"/projects/{self.get_id()}/repository/compare"
query_data = {"from": from_, "to": to}
@@ -181,7 +181,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabGetError: If the server failed to perform the request
Returns:
- list: The contributors
+ The contributors
"""
path = f"/projects/{self.get_id()}/repository/contributors"
return self.manager.gitlab.http_list(path, **kwargs)
@@ -213,7 +213,7 @@ class RepositoryMixin(_RestObjectBase):
GitlabListError: If the server failed to perform the request
Returns:
- bytes: The binary data of the archive
+ The binary data of the archive
"""
path = f"/projects/{self.get_id()}/repository/archive"
query_data = {}
diff --git a/gitlab/v4/objects/services.py b/gitlab/v4/objects/services.py
index 388b9c1..4aa87cc 100644
--- a/gitlab/v4/objects/services.py
+++ b/gitlab/v4/objects/services.py
@@ -268,7 +268,7 @@ class ProjectServiceManager(GetMixin, UpdateMixin, DeleteMixin, ListMixin, RESTM
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- object: The generated RESTObject.
+ The generated RESTObject.
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -292,7 +292,7 @@ class ProjectServiceManager(GetMixin, UpdateMixin, DeleteMixin, ListMixin, RESTM
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
Raises:
GitlabAuthenticationError: If authentication is not correct
@@ -308,6 +308,6 @@ class ProjectServiceManager(GetMixin, UpdateMixin, DeleteMixin, ListMixin, RESTM
"""List the services known by python-gitlab.
Returns:
- list: The list of service code names.
+ The list of service code names.
"""
return list(self._service_attrs.keys())
diff --git a/gitlab/v4/objects/settings.py b/gitlab/v4/objects/settings.py
index 2e8ac79..0fb7f8a 100644
--- a/gitlab/v4/objects/settings.py
+++ b/gitlab/v4/objects/settings.py
@@ -103,7 +103,7 @@ class ApplicationSettingsManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
Raises:
GitlabAuthenticationError: If authentication is not correct
diff --git a/gitlab/v4/objects/sidekiq.py b/gitlab/v4/objects/sidekiq.py
index 9e00fe4..c0bf9d2 100644
--- a/gitlab/v4/objects/sidekiq.py
+++ b/gitlab/v4/objects/sidekiq.py
@@ -31,7 +31,7 @@ class SidekiqManager(RESTManager):
GitlabGetError: If the information couldn't be retrieved
Returns:
- dict: Information about the Sidekiq queues
+ Information about the Sidekiq queues
"""
return self.gitlab.http_get("/sidekiq/queue_metrics", **kwargs)
@@ -50,7 +50,7 @@ class SidekiqManager(RESTManager):
GitlabGetError: If the information couldn't be retrieved
Returns:
- dict: Information about the register Sidekiq worker
+ Information about the register Sidekiq worker
"""
return self.gitlab.http_get("/sidekiq/process_metrics", **kwargs)
@@ -67,7 +67,7 @@ class SidekiqManager(RESTManager):
GitlabGetError: If the information couldn't be retrieved
Returns:
- dict: Statistics about the Sidekiq jobs performed
+ Statistics about the Sidekiq jobs performed
"""
return self.gitlab.http_get("/sidekiq/job_stats", **kwargs)
@@ -86,6 +86,6 @@ class SidekiqManager(RESTManager):
GitlabGetError: If the information couldn't be retrieved
Returns:
- dict: All available Sidekiq metrics and statistics
+ All available Sidekiq metrics and statistics
"""
return self.gitlab.http_get("/sidekiq/compound_metrics", **kwargs)
diff --git a/gitlab/v4/objects/snippets.py b/gitlab/v4/objects/snippets.py
index 08fffb9..66459c0 100644
--- a/gitlab/v4/objects/snippets.py
+++ b/gitlab/v4/objects/snippets.py
@@ -48,7 +48,7 @@ class Snippet(UserAgentDetailMixin, SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabGetError: If the content could not be retrieved
Returns:
- str: The snippet content
+ The snippet content
"""
path = f"/snippets/{self.get_id()}/raw"
result = self.manager.gitlab.http_get(
@@ -81,7 +81,7 @@ class SnippetManager(CRUDMixin, RESTManager):
GitlabListError: If the list could not be retrieved
Returns:
- RESTObjectList: A generator for the snippets list
+ A generator for the snippets list
"""
return self.list(path="/snippets/public", **kwargs)
@@ -122,7 +122,7 @@ class ProjectSnippet(UserAgentDetailMixin, SaveMixin, ObjectDeleteMixin, RESTObj
GitlabGetError: If the content could not be retrieved
Returns:
- str: The snippet content
+ The snippet content
"""
path = f"{self.manager.path}/{self.get_id()}/raw"
result = self.manager.gitlab.http_get(
diff --git a/gitlab/v4/objects/todos.py b/gitlab/v4/objects/todos.py
index 9f8c52d..e441eff 100644
--- a/gitlab/v4/objects/todos.py
+++ b/gitlab/v4/objects/todos.py
@@ -53,6 +53,6 @@ class TodoManager(ListMixin, DeleteMixin, RESTManager):
GitlabTodoError: If the server failed to perform the request
Returns:
- int: The number of todos marked done
+ The number of todos marked done
"""
self.gitlab.http_post("/todos/mark_as_done", **kwargs)
diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py
index 9a4f5ec..fac448a 100644
--- a/gitlab/v4/objects/users.py
+++ b/gitlab/v4/objects/users.py
@@ -167,7 +167,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabBlockError: If the user could not be blocked
Returns:
- bool: Whether the user status has been changed
+ Whether the user status has been changed
"""
path = f"/users/{self.id}/block"
server_data = self.manager.gitlab.http_post(path, **kwargs)
@@ -188,7 +188,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabFollowError: If the user could not be followed
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
"""
path = f"/users/{self.id}/follow"
return self.manager.gitlab.http_post(path, **kwargs)
@@ -206,7 +206,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabUnfollowError: If the user could not be followed
Returns:
- dict: The new object data (*not* a RESTObject)
+ The new object data (*not* a RESTObject)
"""
path = f"/users/{self.id}/unfollow"
return self.manager.gitlab.http_post(path, **kwargs)
@@ -224,7 +224,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabUnblockError: If the user could not be unblocked
Returns:
- bool: Whether the user status has been changed
+ Whether the user status has been changed
"""
path = f"/users/{self.id}/unblock"
server_data = self.manager.gitlab.http_post(path, **kwargs)
@@ -245,7 +245,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabDeactivateError: If the user could not be deactivated
Returns:
- bool: Whether the user status has been changed
+ Whether the user status has been changed
"""
path = f"/users/{self.id}/deactivate"
server_data = self.manager.gitlab.http_post(path, **kwargs)
@@ -266,7 +266,7 @@ class User(SaveMixin, ObjectDeleteMixin, RESTObject):
GitlabActivateError: If the user could not be activated
Returns:
- bool: Whether the user status has been changed
+ Whether the user status has been changed
"""
path = f"/users/{self.id}/activate"
server_data = self.manager.gitlab.http_post(path, **kwargs)
@@ -528,7 +528,7 @@ class UserProjectManager(ListMixin, CreateMixin, RESTManager):
**kwargs: Extra options to send to the server (e.g. sudo)
Returns:
- list: The list of objects, or a generator if `as_list` is False
+ The list of objects, or a generator if `as_list` is False
Raises:
GitlabAuthenticationError: If authentication is not correct