Skip to content

Commit e8663fe

Browse files
committed
feat(api): renamed _upload_path to _upload_string
1 parent fcd4ed5 commit e8663fe

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

gitlab/mixins.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -952,19 +952,19 @@ class UploadMixin(_RestObjectBase):
952952
_module: ModuleType
953953
_parent_attrs: Dict[str, Any]
954954
_updated_attrs: Dict[str, Any]
955-
_upload_path: str
955+
_upload_string: str
956956
manager: base.RESTManager
957957

958958
def _get_upload_path(self) -> str:
959-
"""Formats _upload_path with object attributes.
959+
"""Formats _upload_string with object attributes.
960960
961961
Returns:
962962
The upload path
963963
"""
964964
if TYPE_CHECKING:
965-
assert isinstance(self._upload_path, str)
965+
assert isinstance(self._upload_string, str)
966966
data = self.attributes
967-
return self._upload_path.format(**data)
967+
return self._upload_string.format(**data)
968968

969969
@cli.register_custom_action(("Project", "ProjectWiki"), ("filename", "filepath"))
970970
@exc.on_http_error(exc.GitlabUploadError)

gitlab/v4/objects/projects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class Project(
163163
RefreshMixin, SaveMixin, ObjectDeleteMixin, RepositoryMixin, UploadMixin, RESTObject
164164
):
165165
_repr_attr = "path_with_namespace"
166-
_upload_path = "/projects/{id}/uploads"
166+
_upload_string = "/projects/{id}/uploads"
167167

168168
access_tokens: ProjectAccessTokenManager
169169
accessrequests: ProjectAccessRequestManager

gitlab/v4/objects/wikis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class ProjectWiki(SaveMixin, ObjectDeleteMixin, UploadMixin, RESTObject):
1616
_id_attr = "slug"
1717
_repr_attr = "slug"
18-
_upload_path = "/projects/{project_id}/wikis/attachments"
18+
_upload_string = "/projects/{project_id}/wikis/attachments"
1919

2020

2121
class ProjectWikiManager(CRUDMixin, RESTManager):

0 commit comments

Comments
 (0)