summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-03-01 13:41:29 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-04-24 10:12:20 -0700
commit565d5488b779de19a720d7a904c6fc14c394a4b9 (patch)
treea5db757a06c9387e8de19d70afa868a0409a25a0 /gitlab/v4/objects
parentcfc42d246a4fc9a9afa9a676efcac0774e909aab (diff)
downloadgitlab-565d5488b779de19a720d7a904c6fc14c394a4b9.tar.gz
fix: add a check to ensure the MRO is correct
Add a check to ensure the MRO (Method Resolution Order) is correct for classes in gitlab.v4.objects when doing type-checking. An example of an incorrect definition: class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin): ^^^^^^^^^^ This should be at the end. Correct way would be: class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject): Correctly at the end ^^^^^^^^^^ Also fix classes which have the issue.
Diffstat (limited to 'gitlab/v4/objects')
-rw-r--r--gitlab/v4/objects/commits.py2
-rw-r--r--gitlab/v4/objects/deployments.py2
-rw-r--r--gitlab/v4/objects/jobs.py2
-rw-r--r--gitlab/v4/objects/pipelines.py2
-rw-r--r--gitlab/v4/objects/releases.py2
5 files changed, 5 insertions, 5 deletions
diff --git a/gitlab/v4/objects/commits.py b/gitlab/v4/objects/commits.py
index 037a90d..6176a08 100644
--- a/gitlab/v4/objects/commits.py
+++ b/gitlab/v4/objects/commits.py
@@ -159,7 +159,7 @@ class ProjectCommitCommentManager(ListMixin, CreateMixin, RESTManager):
)
-class ProjectCommitStatus(RESTObject, RefreshMixin):
+class ProjectCommitStatus(RefreshMixin, RESTObject):
pass
diff --git a/gitlab/v4/objects/deployments.py b/gitlab/v4/objects/deployments.py
index 395bc24..64d779f 100644
--- a/gitlab/v4/objects/deployments.py
+++ b/gitlab/v4/objects/deployments.py
@@ -8,7 +8,7 @@ __all__ = [
]
-class ProjectDeployment(RESTObject, SaveMixin):
+class ProjectDeployment(SaveMixin, RESTObject):
pass
diff --git a/gitlab/v4/objects/jobs.py b/gitlab/v4/objects/jobs.py
index 6513d75..e6e04e1 100644
--- a/gitlab/v4/objects/jobs.py
+++ b/gitlab/v4/objects/jobs.py
@@ -10,7 +10,7 @@ __all__ = [
]
-class ProjectJob(RESTObject, RefreshMixin):
+class ProjectJob(RefreshMixin, RESTObject):
@cli.register_custom_action("ProjectJob")
@exc.on_http_error(exc.GitlabJobCancelError)
def cancel(self, **kwargs):
diff --git a/gitlab/v4/objects/pipelines.py b/gitlab/v4/objects/pipelines.py
index bafab9b..724c5e8 100644
--- a/gitlab/v4/objects/pipelines.py
+++ b/gitlab/v4/objects/pipelines.py
@@ -30,7 +30,7 @@ __all__ = [
]
-class ProjectPipeline(RESTObject, RefreshMixin, ObjectDeleteMixin):
+class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject):
_managers = (
("jobs", "ProjectPipelineJobManager"),
("bridges", "ProjectPipelineBridgeManager"),
diff --git a/gitlab/v4/objects/releases.py b/gitlab/v4/objects/releases.py
index ea74adb..9c94187 100644
--- a/gitlab/v4/objects/releases.py
+++ b/gitlab/v4/objects/releases.py
@@ -24,7 +24,7 @@ class ProjectReleaseManager(NoUpdateMixin, RESTManager):
)
-class ProjectReleaseLink(RESTObject, ObjectDeleteMixin, SaveMixin):
+class ProjectReleaseLink(ObjectDeleteMixin, SaveMixin, RESTObject):
pass