diff options
author | John L. Villalovos <john@sodarock.com> | 2021-12-01 16:04:16 -0800 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-12-08 07:36:35 -0800 |
commit | d27c50ab9d55dd715a7bee5b0c61317f8565c8bf (patch) | |
tree | 48173d761de29daf78fb9573ff693a74edf601f1 /gitlab/v4/objects/pipelines.py | |
parent | 494535337b71592effeca57bb1ff2e735ebeb58a (diff) | |
download | gitlab-jlvillal/get_without_id.tar.gz |
chore: add get() methods for GetWithoutIdMixin based classesjlvillal/get_without_id
Add the get() methods for the GetWithoutIdMixin based classes.
Update the tests/meta/test_ensure_type_hints.py tests to check to
ensure that the get methods are defined with the correct return type.
Diffstat (limited to 'gitlab/v4/objects/pipelines.py')
-rw-r--r-- | gitlab/v4/objects/pipelines.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gitlab/v4/objects/pipelines.py b/gitlab/v4/objects/pipelines.py index fd597da..ac4290f 100644 --- a/gitlab/v4/objects/pipelines.py +++ b/gitlab/v4/objects/pipelines.py @@ -246,3 +246,8 @@ class ProjectPipelineTestReportManager(GetWithoutIdMixin, RESTManager): _path = "/projects/{project_id}/pipelines/{pipeline_id}/test_report" _obj_cls = ProjectPipelineTestReport _from_parent_attrs = {"project_id": "project_id", "pipeline_id": "id"} + + def get( + self, id: Optional[Union[int, str]] = None, **kwargs: Any + ) -> Optional[ProjectPipelineTestReport]: + return cast(Optional[ProjectPipelineTestReport], super().get(id=id, **kwargs)) |