| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 515a8a2 commit edd01a5
64 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -397,10 +397,11 @@ def auth(self) -> None: | |||
| 397 | 397 | The `user` attribute will hold a `gitlab.objects.CurrentUser` object on | |
| 398 | 398 | success. | |
| 399 | 399 | """ | |
| 400 | - self.user = self._objects.CurrentUserManager(self).get() | ||
| 400 | + # pylint: disable=line-too-long | ||
| 401 | + self.user = self._objects.CurrentUserManager(self).get() # type: ignore[assignment] | ||
| 401 | 402 | ||
| 402 | 403 | if hasattr(self.user, "web_url") and hasattr(self.user, "username"): | |
| 403 | - self._check_url(self.user.web_url, path=self.user.username) | ||
| 404 | + self._check_url(self.user.web_url, path=self.user.username) # type: ignore[union-attr] | ||
| 404 | 405 | ||
| 405 | 406 | def version(self) -> Tuple[str, str]: | |
| 406 | 407 | """Returns the version and revision of the gitlab server. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - from typing import Any, cast, Dict, Optional, Union | ||
| 1 | + from typing import Any, Dict, Optional, Union | ||
| 2 | 2 | ||
| 3 | 3 | from gitlab import exceptions as exc | |
| 4 | 4 | from gitlab.base import RESTManager, RESTObject | |
@@ -58,6 +58,3 @@ def update( | |||
| 58 | 58 | new_data = new_data or {} | |
| 59 | 59 | data = new_data.copy() | |
| 60 | 60 | return super().update(id, data, **kwargs) | |
| 61 | - | ||
| 62 | - def get(self, **kwargs: Any) -> ApplicationAppearance: | ||
| 63 | - return cast(ApplicationAppearance, super().get(**kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,8 +3,6 @@ | |||
| 3 | 3 | https://docs.gitlab.com/ee/api/audit_events.html | |
| 4 | 4 | """ | |
| 5 | 5 | ||
| 6 | - from typing import Any, cast, Union | ||
| 7 | - | ||
| 8 | 6 | from gitlab.base import RESTManager, RESTObject | |
| 9 | 7 | from gitlab.mixins import RetrieveMixin | |
| 10 | 8 | ||
@@ -29,9 +27,6 @@ class AuditEventManager(RetrieveMixin, RESTManager): | |||
| 29 | 27 | _obj_cls = AuditEvent | |
| 30 | 28 | _list_filters = ("created_after", "created_before", "entity_type", "entity_id") | |
| 31 | 29 | ||
| 32 | - def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> AuditEvent: | ||
| 33 | - return cast(AuditEvent, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 34 | - | ||
| 35 | 30 | ||
| 36 | 31 | class GroupAuditEvent(RESTObject): | |
| 37 | 32 | _id_attr = "id" | |
@@ -43,11 +38,6 @@ class GroupAuditEventManager(RetrieveMixin, RESTManager): | |||
| 43 | 38 | _from_parent_attrs = {"group_id": "id"} | |
| 44 | 39 | _list_filters = ("created_after", "created_before") | |
| 45 | 40 | ||
| 46 | - def get( | ||
| 47 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 48 | - ) -> GroupAuditEvent: | ||
| 49 | - return cast(GroupAuditEvent, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 50 | - | ||
| 51 | 41 | ||
| 52 | 42 | class ProjectAuditEvent(RESTObject): | |
| 53 | 43 | _id_attr = "id" | |
@@ -59,11 +49,6 @@ class ProjectAuditEventManager(RetrieveMixin, RESTManager): | |||
| 59 | 49 | _from_parent_attrs = {"project_id": "id"} | |
| 60 | 50 | _list_filters = ("created_after", "created_before") | |
| 61 | 51 | ||
| 62 | - def get( | ||
| 63 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 64 | - ) -> ProjectAuditEvent: | ||
| 65 | - return cast(ProjectAuditEvent, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 66 | - | ||
| 67 | 52 | ||
| 68 | 53 | class ProjectAudit(ProjectAuditEvent): | |
| 69 | 54 | pass | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from typing import Any, cast, Union | ||
| 2 | - | ||
| 3 | 1 | from gitlab.base import RESTManager, RESTObject | |
| 4 | 2 | from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin | |
| 5 | 3 | from gitlab.types import RequiredOptional | |
@@ -34,11 +32,6 @@ class GroupEpicAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 34 | 32 | _from_parent_attrs = {"group_id": "group_id", "epic_iid": "iid"} | |
| 35 | 33 | _create_attrs = RequiredOptional(required=("name",)) | |
| 36 | 34 | ||
| 37 | - def get( | ||
| 38 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 39 | - ) -> GroupEpicAwardEmoji: | ||
| 40 | - return cast(GroupEpicAwardEmoji, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 41 | - | ||
| 42 | 35 | ||
| 43 | 36 | class GroupEpicNoteAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 44 | 37 | pass | |
@@ -54,11 +47,6 @@ class GroupEpicNoteAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 54 | 47 | } | |
| 55 | 48 | _create_attrs = RequiredOptional(required=("name",)) | |
| 56 | 49 | ||
| 57 | - def get( | ||
| 58 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 59 | - ) -> GroupEpicNoteAwardEmoji: | ||
| 60 | - return cast(GroupEpicNoteAwardEmoji, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 61 | - | ||
| 62 | 50 | ||
| 63 | 51 | class ProjectIssueAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 64 | 52 | pass | |
@@ -70,11 +58,6 @@ class ProjectIssueAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 70 | 58 | _from_parent_attrs = {"project_id": "project_id", "issue_iid": "iid"} | |
| 71 | 59 | _create_attrs = RequiredOptional(required=("name",)) | |
| 72 | 60 | ||
| 73 | - def get( | ||
| 74 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 75 | - ) -> ProjectIssueAwardEmoji: | ||
| 76 | - return cast(ProjectIssueAwardEmoji, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 77 | - | ||
| 78 | 61 | ||
| 79 | 62 | class ProjectIssueNoteAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 80 | 63 | pass | |
@@ -90,11 +73,6 @@ class ProjectIssueNoteAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 90 | 73 | } | |
| 91 | 74 | _create_attrs = RequiredOptional(required=("name",)) | |
| 92 | 75 | ||
| 93 | - def get( | ||
| 94 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 95 | - ) -> ProjectIssueNoteAwardEmoji: | ||
| 96 | - return cast(ProjectIssueNoteAwardEmoji, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 97 | - | ||
| 98 | 76 | ||
| 99 | 77 | class ProjectMergeRequestAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 100 | 78 | pass | |
@@ -106,13 +84,6 @@ class ProjectMergeRequestAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 106 | 84 | _from_parent_attrs = {"project_id": "project_id", "mr_iid": "iid"} | |
| 107 | 85 | _create_attrs = RequiredOptional(required=("name",)) | |
| 108 | 86 | ||
| 109 | - def get( | ||
| 110 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 111 | - ) -> ProjectMergeRequestAwardEmoji: | ||
| 112 | - return cast( | ||
| 113 | - ProjectMergeRequestAwardEmoji, super().get(id=id, lazy=lazy, **kwargs) | ||
| 114 | - ) | ||
| 115 | - | ||
| 116 | 87 | ||
| 117 | 88 | class ProjectMergeRequestNoteAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 118 | 89 | pass | |
@@ -128,13 +99,6 @@ class ProjectMergeRequestNoteAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 128 | 99 | } | |
| 129 | 100 | _create_attrs = RequiredOptional(required=("name",)) | |
| 130 | 101 | ||
| 131 | - def get( | ||
| 132 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 133 | - ) -> ProjectMergeRequestNoteAwardEmoji: | ||
| 134 | - return cast( | ||
| 135 | - ProjectMergeRequestNoteAwardEmoji, super().get(id=id, lazy=lazy, **kwargs) | ||
| 136 | - ) | ||
| 137 | - | ||
| 138 | 102 | ||
| 139 | 103 | class ProjectSnippetAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 140 | 104 | pass | |
@@ -146,11 +110,6 @@ class ProjectSnippetAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 146 | 110 | _from_parent_attrs = {"project_id": "project_id", "snippet_id": "id"} | |
| 147 | 111 | _create_attrs = RequiredOptional(required=("name",)) | |
| 148 | 112 | ||
| 149 | - def get( | ||
| 150 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 151 | - ) -> ProjectSnippetAwardEmoji: | ||
| 152 | - return cast(ProjectSnippetAwardEmoji, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 153 | - | ||
| 154 | 113 | ||
| 155 | 114 | class ProjectSnippetNoteAwardEmoji(ObjectDeleteMixin, RESTObject): | |
| 156 | 115 | pass | |
@@ -165,10 +124,3 @@ class ProjectSnippetNoteAwardEmojiManager(NoUpdateMixin, RESTManager): | |||
| 165 | 124 | "note_id": "id", | |
| 166 | 125 | } | |
| 167 | 126 | _create_attrs = RequiredOptional(required=("name",)) | |
| 168 | - | ||
| 169 | - def get( | ||
| 170 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 171 | - ) -> ProjectSnippetNoteAwardEmoji: | ||
| 172 | - return cast( | ||
| 173 | - ProjectSnippetNoteAwardEmoji, super().get(id=id, lazy=lazy, **kwargs) | ||
| 174 | - ) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from typing import Any, cast, Union | ||
| 2 | - | ||
| 3 | 1 | from gitlab.base import RESTManager, RESTObject | |
| 4 | 2 | from gitlab.mixins import BadgeRenderMixin, CRUDMixin, ObjectDeleteMixin, SaveMixin | |
| 5 | 3 | from gitlab.types import RequiredOptional | |
@@ -23,9 +21,6 @@ class GroupBadgeManager(BadgeRenderMixin, CRUDMixin, RESTManager): | |||
| 23 | 21 | _create_attrs = RequiredOptional(required=("link_url", "image_url")) | |
| 24 | 22 | _update_attrs = RequiredOptional(optional=("link_url", "image_url")) | |
| 25 | 23 | ||
| 26 | - def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> GroupBadge: | ||
| 27 | - return cast(GroupBadge, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 28 | - | ||
| 29 | 24 | ||
| 30 | 25 | class ProjectBadge(SaveMixin, ObjectDeleteMixin, RESTObject): | |
| 31 | 26 | pass | |
@@ -37,8 +32,3 @@ class ProjectBadgeManager(BadgeRenderMixin, CRUDMixin, RESTManager): | |||
| 37 | 32 | _from_parent_attrs = {"project_id": "id"} | |
| 38 | 33 | _create_attrs = RequiredOptional(required=("link_url", "image_url")) | |
| 39 | 34 | _update_attrs = RequiredOptional(optional=("link_url", "image_url")) | |
| 40 | - | ||
| 41 | - def get( | ||
| 42 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 43 | - ) -> ProjectBadge: | ||
| 44 | - return cast(ProjectBadge, super().get(id=id, lazy=lazy, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from typing import Any, cast, Union | ||
| 2 | - | ||
| 3 | 1 | from gitlab.base import RESTManager, RESTObject | |
| 4 | 2 | from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin | |
| 5 | 3 | from gitlab.types import RequiredOptional | |
@@ -29,11 +27,6 @@ class GroupBoardListManager(CRUDMixin, RESTManager): | |||
| 29 | 27 | ) | |
| 30 | 28 | _update_attrs = RequiredOptional(required=("position",)) | |
| 31 | 29 | ||
| 32 | - def get( | ||
| 33 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 34 | - ) -> GroupBoardList: | ||
| 35 | - return cast(GroupBoardList, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 36 | - | ||
| 37 | 30 | ||
| 38 | 31 | class GroupBoard(SaveMixin, ObjectDeleteMixin, RESTObject): | |
| 39 | 32 | lists: GroupBoardListManager | |
@@ -45,9 +38,6 @@ class GroupBoardManager(CRUDMixin, RESTManager): | |||
| 45 | 38 | _from_parent_attrs = {"group_id": "id"} | |
| 46 | 39 | _create_attrs = RequiredOptional(required=("name",)) | |
| 47 | 40 | ||
| 48 | - def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> GroupBoard: | ||
| 49 | - return cast(GroupBoard, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 50 | - | ||
| 51 | 41 | ||
| 52 | 42 | class ProjectBoardList(SaveMixin, ObjectDeleteMixin, RESTObject): | |
| 53 | 43 | pass | |
@@ -62,11 +52,6 @@ class ProjectBoardListManager(CRUDMixin, RESTManager): | |||
| 62 | 52 | ) | |
| 63 | 53 | _update_attrs = RequiredOptional(required=("position",)) | |
| 64 | 54 | ||
| 65 | - def get( | ||
| 66 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 67 | - ) -> ProjectBoardList: | ||
| 68 | - return cast(ProjectBoardList, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 69 | - | ||
| 70 | 55 | ||
| 71 | 56 | class ProjectBoard(SaveMixin, ObjectDeleteMixin, RESTObject): | |
| 72 | 57 | lists: ProjectBoardListManager | |
@@ -77,8 +62,3 @@ class ProjectBoardManager(CRUDMixin, RESTManager): | |||
| 77 | 62 | _obj_cls = ProjectBoard | |
| 78 | 63 | _from_parent_attrs = {"project_id": "id"} | |
| 79 | 64 | _create_attrs = RequiredOptional(required=("name",)) | |
| 80 | - | ||
| 81 | - def get( | ||
| 82 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 83 | - ) -> ProjectBoard: | ||
| 84 | - return cast(ProjectBoard, super().get(id=id, lazy=lazy, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from typing import Any, cast, Union | ||
| 2 | - | ||
| 3 | 1 | from gitlab.base import RESTManager, RESTObject | |
| 4 | 2 | from gitlab.mixins import ( | |
| 5 | 3 | CRUDMixin, | |
@@ -28,11 +26,6 @@ class ProjectBranchManager(NoUpdateMixin, RESTManager): | |||
| 28 | 26 | _from_parent_attrs = {"project_id": "id"} | |
| 29 | 27 | _create_attrs = RequiredOptional(required=("branch", "ref")) | |
| 30 | 28 | ||
| 31 | - def get( | ||
| 32 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 33 | - ) -> ProjectBranch: | ||
| 34 | - return cast(ProjectBranch, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 35 | - | ||
| 36 | 29 | ||
| 37 | 30 | class ProjectProtectedBranch(SaveMixin, ObjectDeleteMixin, RESTObject): | |
| 38 | 31 | _id_attr = "name" | |
@@ -56,8 +49,3 @@ class ProjectProtectedBranchManager(CRUDMixin, RESTManager): | |||
| 56 | 49 | ), | |
| 57 | 50 | ) | |
| 58 | 51 | _update_method = UpdateMethod.PATCH | |
| 59 | - | ||
| 60 | - def get( | ||
| 61 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 62 | - ) -> ProjectProtectedBranch: | ||
| 63 | - return cast(ProjectProtectedBranch, super().get(id=id, lazy=lazy, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from typing import Any, cast, Union | ||
| 2 | - | ||
| 3 | 1 | from gitlab.base import RESTManager, RESTObject | |
| 4 | 2 | from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin | |
| 5 | 3 | from gitlab.types import ArrayAttribute, RequiredOptional | |
@@ -33,8 +31,3 @@ class BroadcastMessageManager(CRUDMixin, RESTManager): | |||
| 33 | 31 | ) | |
| 34 | 32 | ) | |
| 35 | 33 | _types = {"target_access_levels": ArrayAttribute} | |
| 36 | - | ||
| 37 | - def get( | ||
| 38 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 39 | - ) -> BroadcastMessage: | ||
| 40 | - return cast(BroadcastMessage, super().get(id=id, lazy=lazy, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - from typing import Any, cast, Union | ||
| 2 | - | ||
| 3 | 1 | from gitlab.base import RESTManager, RESTObject | |
| 4 | 2 | from gitlab.mixins import CreateMixin, ListMixin, RefreshMixin, RetrieveMixin | |
| 5 | 3 | from gitlab.types import RequiredOptional | |
@@ -24,9 +22,6 @@ class BulkImportManager(CreateMixin, RetrieveMixin, RESTManager): | |||
| 24 | 22 | _create_attrs = RequiredOptional(required=("configuration", "entities")) | |
| 25 | 23 | _list_filters = ("sort", "status") | |
| 26 | 24 | ||
| 27 | - def get(self, id: Union[str, int], lazy: bool = False, **kwargs: Any) -> BulkImport: | ||
| 28 | - return cast(BulkImport, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 29 | - | ||
| 30 | 25 | ||
| 31 | 26 | class BulkImportEntity(RefreshMixin, RESTObject): | |
| 32 | 27 | pass | |
@@ -38,11 +33,6 @@ class BulkImportEntityManager(RetrieveMixin, RESTManager): | |||
| 38 | 33 | _from_parent_attrs = {"bulk_import_id": "id"} | |
| 39 | 34 | _list_filters = ("sort", "status") | |
| 40 | 35 | ||
| 41 | - def get( | ||
| 42 | - self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 43 | - ) -> BulkImportEntity: | ||
| 44 | - return cast(BulkImportEntity, super().get(id=id, lazy=lazy, **kwargs)) | ||
| 45 | - | ||
| 46 | 36 | ||
| 47 | 37 | class BulkImportAllEntity(RESTObject): | |
| 48 | 38 | pass | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | https://docs.gitlab.com/ee/api/lint.html | |
| 4 | 4 | """ | |
| 5 | 5 | ||
| 6 | - from typing import Any, cast | ||
| 6 | + from typing import Any | ||
| 7 | 7 | ||
| 8 | 8 | from gitlab.base import RESTManager, RESTObject | |
| 9 | 9 | from gitlab.cli import register_custom_action | |
@@ -59,9 +59,6 @@ class ProjectCiLintManager(GetWithoutIdMixin, CreateMixin, RESTManager): | |||
| 59 | 59 | required=("content",), optional=("dry_run", "include_jobs", "ref") | |
| 60 | 60 | ) | |
| 61 | 61 | ||
| 62 | - def get(self, **kwargs: Any) -> ProjectCiLint: | ||
| 63 | - return cast(ProjectCiLint, super().get(**kwargs)) | ||
| 64 | - | ||
| 65 | 62 | @register_custom_action( | |
| 66 | 63 | cls_names="ProjectCiLintManager", | |
| 67 | 64 | required=("content",), | |
| Back | FazBrowse Home | New Git URL |
0 commit comments