|
13 | 13 | from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin |
14 | 14 | from gitlab.types import FileAttribute, RequiredOptional |
15 | 15 |
|
16 | | -__all__ = ["SecureFile", "SecureFileManager"] |
| 16 | +__all__ = ["ProjectSecureFile", "ProjectSecureFileManager"] |
17 | 17 |
|
18 | 18 |
|
19 | | -class SecureFile(ObjectDeleteMixin, RESTObject): |
20 | | - @cli.register_custom_action("SecureFile") |
| 19 | +class ProjectSecureFile(ObjectDeleteMixin, RESTObject): |
| 20 | + @cli.register_custom_action("ProjectSecureFile") |
21 | 21 | @exc.on_http_error(exc.GitlabGetError) |
22 | 22 | def download( |
23 | 23 | self, |
@@ -58,12 +58,14 @@ def download( |
58 | 58 | ) |
59 | 59 |
|
60 | 60 |
|
61 | | -class SecureFileManager(NoUpdateMixin, RESTManager): |
| 61 | +class ProjectSecureFileManager(NoUpdateMixin, RESTManager): |
62 | 62 | _path = "/projects/{project_id}/secure_files" |
63 | | - _obj_cls = SecureFile |
| 63 | + _obj_cls = ProjectSecureFile |
64 | 64 | _from_parent_attrs = {"project_id": "id"} |
65 | 65 | _create_attrs = RequiredOptional(required=("name", "file")) |
66 | 66 | _types = {"file": FileAttribute} |
67 | 67 |
|
68 | | - def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> SecureFile: |
69 | | - return cast(SecureFile, super().get(id=id, lazy=lazy, **kwargs)) |
| 68 | + def get( |
| 69 | + self, id: Union[str, int], lazy: bool = False, **kwargs: Any |
| 70 | + ) -> ProjectSecureFile: |
| 71 | + return cast(ProjectSecureFile, super().get(id=id, lazy=lazy, **kwargs)) |
0 commit comments