| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -126,7 +126,7 @@ class GetWithoutIdMixin(_RestManagerBase): | |||
| 126 | 126 | @exc.on_http_error(exc.GitlabGetError) | |
| 127 | 127 | def get( | |
| 128 | 128 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 129 | - ) -> Optional[base.RESTObject]: | ||
| 129 | + ) -> base.RESTObject: | ||
| 130 | 130 | """Retrieve a single object. | |
| 131 | 131 | ||
| 132 | 132 | Args: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,5 +60,5 @@ def update( | |||
| 60 | 60 | ||
| 61 | 61 | def get( | |
| 62 | 62 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 63 | - ) -> Optional[ApplicationAppearance]: | ||
| 64 | - return cast(Optional[ApplicationAppearance], super().get(id=id, **kwargs)) | ||
| 63 | + ) -> ApplicationAppearance: | ||
| 64 | + return cast(ApplicationAppearance, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,10 +24,8 @@ class GroupExportManager(GetWithoutIdMixin, CreateMixin, RESTManager): | |||
| 24 | 24 | _obj_cls = GroupExport | |
| 25 | 25 | _from_parent_attrs = {"group_id": "id"} | |
| 26 | 26 | ||
| 27 | - def get( | ||
| 28 | - self, id: Optional[Union[int, str]] = None, **kwargs: Any | ||
| 29 | - ) -> Optional[GroupExport]: | ||
| 30 | - return cast(Optional[GroupExport], super().get(id=id, **kwargs)) | ||
| 27 | + def get(self, id: Optional[Union[int, str]] = None, **kwargs: Any) -> GroupExport: | ||
| 28 | + return cast(GroupExport, super().get(id=id, **kwargs)) | ||
| 31 | 29 | ||
| 32 | 30 | ||
| 33 | 31 | class GroupImport(RESTObject): | |
@@ -39,10 +37,8 @@ class GroupImportManager(GetWithoutIdMixin, RESTManager): | |||
| 39 | 37 | _obj_cls = GroupImport | |
| 40 | 38 | _from_parent_attrs = {"group_id": "id"} | |
| 41 | 39 | ||
| 42 | - def get( | ||
| 43 | - self, id: Optional[Union[int, str]] = None, **kwargs: Any | ||
| 44 | - ) -> Optional[GroupImport]: | ||
| 45 | - return cast(Optional[GroupImport], super().get(id=id, **kwargs)) | ||
| 40 | + def get(self, id: Optional[Union[int, str]] = None, **kwargs: Any) -> GroupImport: | ||
| 41 | + return cast(GroupImport, super().get(id=id, **kwargs)) | ||
| 46 | 42 | ||
| 47 | 43 | ||
| 48 | 44 | class ProjectExport(DownloadMixin, RefreshMixin, RESTObject): | |
@@ -55,10 +51,8 @@ class ProjectExportManager(GetWithoutIdMixin, CreateMixin, RESTManager): | |||
| 55 | 51 | _from_parent_attrs = {"project_id": "id"} | |
| 56 | 52 | _create_attrs = RequiredOptional(optional=("description",)) | |
| 57 | 53 | ||
| 58 | - def get( | ||
| 59 | - self, id: Optional[Union[int, str]] = None, **kwargs: Any | ||
| 60 | - ) -> Optional[ProjectExport]: | ||
| 61 | - return cast(Optional[ProjectExport], super().get(id=id, **kwargs)) | ||
| 54 | + def get(self, id: Optional[Union[int, str]] = None, **kwargs: Any) -> ProjectExport: | ||
| 55 | + return cast(ProjectExport, super().get(id=id, **kwargs)) | ||
| 62 | 56 | ||
| 63 | 57 | ||
| 64 | 58 | class ProjectImport(RefreshMixin, RESTObject): | |
@@ -70,7 +64,5 @@ class ProjectImportManager(GetWithoutIdMixin, RESTManager): | |||
| 70 | 64 | _obj_cls = ProjectImport | |
| 71 | 65 | _from_parent_attrs = {"project_id": "id"} | |
| 72 | 66 | ||
| 73 | - def get( | ||
| 74 | - self, id: Optional[Union[int, str]] = None, **kwargs: Any | ||
| 75 | - ) -> Optional[ProjectImport]: | ||
| 76 | - return cast(Optional[ProjectImport], super().get(id=id, **kwargs)) | ||
| 67 | + def get(self, id: Optional[Union[int, str]] = None, **kwargs: Any) -> ProjectImport: | ||
| 68 | + return cast(ProjectImport, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,8 +47,8 @@ class ProjectApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTManager): | |||
| 47 | 47 | ||
| 48 | 48 | def get( | |
| 49 | 49 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 50 | - ) -> Optional[ProjectApproval]: | ||
| 51 | - return cast(Optional[ProjectApproval], super().get(id=id, **kwargs)) | ||
| 50 | + ) -> ProjectApproval: | ||
| 51 | + return cast(ProjectApproval, super().get(id=id, **kwargs)) | ||
| 52 | 52 | ||
| 53 | 53 | @exc.on_http_error(exc.GitlabUpdateError) | |
| 54 | 54 | def set_approvers( | |
@@ -112,8 +112,8 @@ class ProjectMergeRequestApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTMan | |||
| 112 | 112 | ||
| 113 | 113 | def get( | |
| 114 | 114 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 115 | - ) -> Optional[ProjectMergeRequestApproval]: | ||
| 116 | - return cast(Optional[ProjectMergeRequestApproval], super().get(id=id, **kwargs)) | ||
| 115 | + ) -> ProjectMergeRequestApproval: | ||
| 116 | + return cast(ProjectMergeRequestApproval, super().get(id=id, **kwargs)) | ||
| 117 | 117 | ||
| 118 | 118 | @exc.on_http_error(exc.GitlabUpdateError) | |
| 119 | 119 | def set_approvers( | |
@@ -254,7 +254,5 @@ class ProjectMergeRequestApprovalStateManager(GetWithoutIdMixin, RESTManager): | |||
| 254 | 254 | ||
| 255 | 255 | def get( | |
| 256 | 256 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 257 | - ) -> Optional[ProjectMergeRequestApprovalState]: | ||
| 258 | - return cast( | ||
| 259 | - Optional[ProjectMergeRequestApprovalState], super().get(id=id, **kwargs) | ||
| 260 | - ) | ||
| 257 | + ) -> ProjectMergeRequestApprovalState: | ||
| 258 | + return cast(ProjectMergeRequestApprovalState, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,8 +40,8 @@ class NotificationSettingsManager(GetWithoutIdMixin, UpdateMixin, RESTManager): | |||
| 40 | 40 | ||
| 41 | 41 | def get( | |
| 42 | 42 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 43 | - ) -> Optional[NotificationSettings]: | ||
| 44 | - return cast(Optional[NotificationSettings], super().get(id=id, **kwargs)) | ||
| 43 | + ) -> NotificationSettings: | ||
| 44 | + return cast(NotificationSettings, super().get(id=id, **kwargs)) | ||
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | 47 | class GroupNotificationSettings(NotificationSettings): | |
@@ -55,8 +55,8 @@ class GroupNotificationSettingsManager(NotificationSettingsManager): | |||
| 55 | 55 | ||
| 56 | 56 | def get( | |
| 57 | 57 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 58 | - ) -> Optional[GroupNotificationSettings]: | ||
| 59 | - return cast(Optional[GroupNotificationSettings], super().get(id=id, **kwargs)) | ||
| 58 | + ) -> GroupNotificationSettings: | ||
| 59 | + return cast(GroupNotificationSettings, super().get(id=id, **kwargs)) | ||
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | 62 | class ProjectNotificationSettings(NotificationSettings): | |
@@ -70,5 +70,5 @@ class ProjectNotificationSettingsManager(NotificationSettingsManager): | |||
| 70 | 70 | ||
| 71 | 71 | def get( | |
| 72 | 72 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 73 | - ) -> Optional[ProjectNotificationSettings]: | ||
| 74 | - return cast(Optional[ProjectNotificationSettings], super().get(id=id, **kwargs)) | ||
| 73 | + ) -> ProjectNotificationSettings: | ||
| 74 | + return cast(ProjectNotificationSettings, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -252,8 +252,8 @@ class ProjectPipelineTestReportManager(GetWithoutIdMixin, RESTManager): | |||
| 252 | 252 | ||
| 253 | 253 | def get( | |
| 254 | 254 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 255 | - ) -> Optional[ProjectPipelineTestReport]: | ||
| 256 | - return cast(Optional[ProjectPipelineTestReport], super().get(id=id, **kwargs)) | ||
| 255 | + ) -> ProjectPipelineTestReport: | ||
| 256 | + return cast(ProjectPipelineTestReport, super().get(id=id, **kwargs)) | ||
| 257 | 257 | ||
| 258 | 258 | ||
| 259 | 259 | class ProjectPipelineTestReportSummary(RESTObject): | |
@@ -267,7 +267,5 @@ class ProjectPipelineTestReportSummaryManager(GetWithoutIdMixin, RESTManager): | |||
| 267 | 267 | ||
| 268 | 268 | def get( | |
| 269 | 269 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 270 | - ) -> Optional[ProjectPipelineTestReportSummary]: | ||
| 271 | - return cast( | ||
| 272 | - Optional[ProjectPipelineTestReportSummary], super().get(id=id, **kwargs) | ||
| 273 | - ) | ||
| 270 | + ) -> ProjectPipelineTestReportSummary: | ||
| 271 | + return cast(ProjectPipelineTestReportSummary, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1030,5 +1030,5 @@ class ProjectStorageManager(GetWithoutIdMixin, RESTManager): | |||
| 1030 | 1030 | ||
| 1031 | 1031 | def get( | |
| 1032 | 1032 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 1033 | - ) -> Optional[ProjectStorage]: | ||
| 1034 | - return cast(Optional[ProjectStorage], super().get(id=id, **kwargs)) | ||
| 1033 | + ) -> ProjectStorage: | ||
| 1034 | + return cast(ProjectStorage, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,5 +53,5 @@ class ProjectPushRulesManager( | |||
| 53 | 53 | ||
| 54 | 54 | def get( | |
| 55 | 55 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 56 | - ) -> Optional[ProjectPushRules]: | ||
| 57 | - return cast(Optional[ProjectPushRules], super().get(id=id, **kwargs)) | ||
| 56 | + ) -> ProjectPushRules: | ||
| 57 | + return cast(ProjectPushRules, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -117,5 +117,5 @@ def update( | |||
| 117 | 117 | ||
| 118 | 118 | def get( | |
| 119 | 119 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 120 | - ) -> Optional[ApplicationSettings]: | ||
| 121 | - return cast(Optional[ApplicationSettings], super().get(id=id, **kwargs)) | ||
| 120 | + ) -> ApplicationSettings: | ||
| 121 | + return cast(ApplicationSettings, super().get(id=id, **kwargs)) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,8 +26,8 @@ class ProjectAdditionalStatisticsManager(GetWithoutIdMixin, RESTManager): | |||
| 26 | 26 | ||
| 27 | 27 | def get( | |
| 28 | 28 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 29 | - ) -> Optional[ProjectAdditionalStatistics]: | ||
| 30 | - return cast(Optional[ProjectAdditionalStatistics], super().get(id=id, **kwargs)) | ||
| 29 | + ) -> ProjectAdditionalStatistics: | ||
| 30 | + return cast(ProjectAdditionalStatistics, super().get(id=id, **kwargs)) | ||
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | 33 | class IssuesStatistics(RefreshMixin, RESTObject): | |
@@ -40,8 +40,8 @@ class IssuesStatisticsManager(GetWithoutIdMixin, RESTManager): | |||
| 40 | 40 | ||
| 41 | 41 | def get( | |
| 42 | 42 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 43 | - ) -> Optional[IssuesStatistics]: | ||
| 44 | - return cast(Optional[IssuesStatistics], super().get(id=id, **kwargs)) | ||
| 43 | + ) -> IssuesStatistics: | ||
| 44 | + return cast(IssuesStatistics, super().get(id=id, **kwargs)) | ||
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | 47 | class GroupIssuesStatistics(RefreshMixin, RESTObject): | |
@@ -55,8 +55,8 @@ class GroupIssuesStatisticsManager(GetWithoutIdMixin, RESTManager): | |||
| 55 | 55 | ||
| 56 | 56 | def get( | |
| 57 | 57 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 58 | - ) -> Optional[GroupIssuesStatistics]: | ||
| 59 | - return cast(Optional[GroupIssuesStatistics], super().get(id=id, **kwargs)) | ||
| 58 | + ) -> GroupIssuesStatistics: | ||
| 59 | + return cast(GroupIssuesStatistics, super().get(id=id, **kwargs)) | ||
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | 62 | class ProjectIssuesStatistics(RefreshMixin, RESTObject): | |
@@ -70,5 +70,5 @@ class ProjectIssuesStatisticsManager(GetWithoutIdMixin, RESTManager): | |||
| 70 | 70 | ||
| 71 | 71 | def get( | |
| 72 | 72 | self, id: Optional[Union[int, str]] = None, **kwargs: Any | |
| 73 | - ) -> Optional[ProjectIssuesStatistics]: | ||
| 74 | - return cast(Optional[ProjectIssuesStatistics], super().get(id=id, **kwargs)) | ||
| 73 | + ) -> ProjectIssuesStatistics: | ||
| 74 | + return cast(ProjectIssuesStatistics, super().get(id=id, **kwargs)) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments