diff options
author | John L. Villalovos <john@sodarock.com> | 2021-06-13 14:40:46 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-09-08 07:18:48 -0700 |
commit | d8de4dc373dc608be6cf6ba14a2acc7efd3fa7a7 (patch) | |
tree | d587e4cb383b136cd9947377e43bd52900121994 /gitlab/v4/objects/notes.py | |
parent | c9b5d3bac8f7c1f779dd57653f718dd0fac4db4b (diff) | |
download | gitlab-d8de4dc373dc608be6cf6ba14a2acc7efd3fa7a7.tar.gz |
chore: convert to using type-annotations for managers
Convert our manager usage to be done via type annotations.
Now to define a manager to be used in a RESTObject subclass can simply
do:
class ExampleClass(CRUDMixin, RESTObject):
my_manager: MyManager
Any type-annotation that annotates it to be of type *Manager (with the
exception of RESTManager) will cause the manager to be created on the
object.
Diffstat (limited to 'gitlab/v4/objects/notes.py')
-rw-r--r-- | gitlab/v4/objects/notes.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/gitlab/v4/objects/notes.py b/gitlab/v4/objects/notes.py index b8a3215..cbd237e 100644 --- a/gitlab/v4/objects/notes.py +++ b/gitlab/v4/objects/notes.py @@ -72,7 +72,6 @@ class ProjectCommitDiscussionNoteManager( class ProjectIssueNote(SaveMixin, ObjectDeleteMixin, RESTObject): awardemojis: ProjectIssueNoteAwardEmojiManager - _managers = (("awardemojis", "ProjectIssueNoteAwardEmojiManager"),) class ProjectIssueNoteManager(CRUDMixin, RESTManager): @@ -106,7 +105,6 @@ class ProjectIssueDiscussionNoteManager( class ProjectMergeRequestNote(SaveMixin, ObjectDeleteMixin, RESTObject): awardemojis: ProjectMergeRequestNoteAwardEmojiManager - _managers = (("awardemojis", "ProjectMergeRequestNoteAwardEmojiManager"),) class ProjectMergeRequestNoteManager(CRUDMixin, RESTManager): @@ -140,7 +138,6 @@ class ProjectMergeRequestDiscussionNoteManager( class ProjectSnippetNote(SaveMixin, ObjectDeleteMixin, RESTObject): awardemojis: ProjectMergeRequestNoteAwardEmojiManager - _managers = (("awardemojis", "ProjectMergeRequestNoteAwardEmojiManager"),) class ProjectSnippetNoteManager(CRUDMixin, RESTManager): |