summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects/secure_files.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-11-17 18:34:10 +0100
committerJohn Villalovos <john@sodarock.com>2022-11-17 14:39:05 -0800
commit0c98b2d8f4b8c1ac6a4b496282f307687b652759 (patch)
treeccf45b0379cd07526ad536732b4232dd47c98a44 /gitlab/v4/objects/secure_files.py
parentad7c8fafd56866002aa6723ceeba4c4bc071ca0d (diff)
downloadgitlab-0c98b2d8f4b8c1ac6a4b496282f307687b652759.tar.gz
refactor: explicitly use ProjectSecureFile
Diffstat (limited to 'gitlab/v4/objects/secure_files.py')
-rw-r--r--gitlab/v4/objects/secure_files.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/gitlab/v4/objects/secure_files.py b/gitlab/v4/objects/secure_files.py
index ce8d12d..a7da5ea 100644
--- a/gitlab/v4/objects/secure_files.py
+++ b/gitlab/v4/objects/secure_files.py
@@ -13,11 +13,11 @@ from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin
from gitlab.types import FileAttribute, RequiredOptional
-__all__ = ["SecureFile", "SecureFileManager"]
+__all__ = ["ProjectSecureFile", "ProjectSecureFileManager"]
-class SecureFile(ObjectDeleteMixin, RESTObject):
- @cli.register_custom_action("SecureFile")
+class ProjectSecureFile(ObjectDeleteMixin, RESTObject):
+ @cli.register_custom_action("ProjectSecureFile")
@exc.on_http_error(exc.GitlabGetError)
def download(
self,
@@ -58,12 +58,14 @@ class SecureFile(ObjectDeleteMixin, RESTObject):
)
-class SecureFileManager(NoUpdateMixin, RESTManager):
+class ProjectSecureFileManager(NoUpdateMixin, RESTManager):
_path = "/projects/{project_id}/secure_files"
- _obj_cls = SecureFile
+ _obj_cls = ProjectSecureFile
_from_parent_attrs = {"project_id": "id"}
_create_attrs = RequiredOptional(required=("name", "file"))
_types = {"file": FileAttribute}
- def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> SecureFile:
- return cast(SecureFile, super().get(id=id, lazy=lazy, **kwargs))
+ def get(
+ self, id: Union[str, int], lazy: bool = False, **kwargs: Any
+ ) -> ProjectSecureFile:
+ return cast(ProjectSecureFile, super().get(id=id, lazy=lazy, **kwargs))