8000 chore: another try · python-gitlab/python-gitlab@31662c8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 31662c8

Browse files
committed
chore: another try
1 parent 5650db9 commit 31662c8

File tree

8 files changed

+58
-58
lines changed

8 files changed

+58
-58
lines changed

gitlab/__init__.py

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,27 @@
1818

1919
from __future__ import print_function
2020
from __future__ import absolute_import
21-
from gitlab.v4 import objects
21+
from gitlab.exceptions import * # noqa
22+
from gitlab.v4.objects.application import * # noqa
23+
from gitlab.v4.objects.broadcast_message import * # noqa
24+
from gitlab.v4.objects.current_user import * # noqa
25+
from gitlab.v4.objects.deploy_key import * # noqa
26+
from gitlab.v4.objects.ee import * # noqa
27+
from gitlab.v4.objects.event import * # noqa
28+
from gitlab.v4.objects.feature import * # noqa
29+
from gitlab.v4.objects.group import * # noqa
30+
from gitlab.v4.objects.hook import * # noqa
31+
from gitlab.v4.objects.issue import * # noqa
32+
from gitlab.v4.objects.mergerequest import * # noqa
33+
from gitlab.v4.objects.namespace import * # noqa
34+
from gitlab.v4.objects.notification_settings import * # noqa
35+
from gitlab.v4.objects.project import * # noqa
36+
from gitlab.v4.objects.runner import * # noqa
37+
from gitlab.v4.objects.sidekiq import * # noqa
38+
from gitlab.v4.objects.snippet import * # noqa
39+
from gitlab.v4.objects.template import * # noqa
40+
from gitlab.v4.objects.todo import * # noqa
41+
from gitlab.v4.objects.user import * # noqa
2242
import importlib
2343
import time
2444
import warnings
@@ -106,34 +126,32 @@ def __init__(
106126

107127
self.per_page = per_page
108128

109-
self._objects = objects
110-
111-
self.broadcastmessages = objects.BroadcastMessageManager(self)
112-
self.deploykeys = objects.DeployKeyManager(self)
113-
self.geonodes = objects.GeoNodeManager(self)
114-
self.gitlabciymls = objects.GitlabciymlManager(self)
115-
self.gitignores = objects.GitignoreManager(self)
116-
self.groups = objects.GroupManager(self)
117-
self.hooks = objects.HookManager(self)
118-
self.issues = objects.IssueManager(self)
119-
self.ldapgroups = objects.LDAPGroupManager(self)
120-
self.licenses = objects.LicenseManager(self)
121-
self.namespaces = objects.NamespaceManager(self)
122-
self.mergerequests = objects.MergeRequestManager(self)
123-
self.notificationsettings = objects.NotificationSettingsManager(self)
124-
self.projects = objects.ProjectManager(self)
125-
self.runners = objects.RunnerManager(self)
126-
self.settings = objects.ApplicationSettingsManager(self)
127-
self.sidekiq = objects.SidekiqManager(self)
128-
self.snippets = objects.SnippetManager(self)
129-
self.users = objects.UserManager(self)
130-
self.todos = objects.TodoManager(self)
131-
self.dockerfiles = objects.DockerfileManager(self)
132-
self.events = objects.EventManager(self)
133-
self.audit_events = objects.AuditEventManager(self)
134-
self.features = objects.FeatureManager(self)
135-
self.pagesdomains = objects.PagesDomainManager(self)
136-
self.user_activities = objects.UserActivitiesManager(self)
129+
self.broadcastmessages = BroadcastMessageManager(self)
130+
self.deploykeys = DeployKeyManager(self)
131+
self.geonodes = GeoNodeManager(self)
132+
self.gitlabciymls = GitlabciymlManager(self)
133+
self.gitignores = GitignoreManager(self)
134+
self.groups = GroupManager(self)
135+
self.hooks = HookManager(self)
136+
self.issues = IssueManager(self)
137+
self.ldapgroups = LDAPGroupManager(self)
138+
self.licenses = LicenseManager(self)
139+
self.namespaces = NamespaceManager(self)
140+
self.mergerequests = MergeRequestManager(self)
141+
self.notificationsettings = NotificationSettingsManager(self)
142+
self.projects = ProjectManager(self)
143+
self.runners = RunnerManager(self)
144+
self.settings = ApplicationSettingsManager(self)
145+
self.sidekiq = SidekiqManager(self)
146+
self.snippets = SnippetManager(self)
147+
self.users = UserManager(self)
148+
self.todos = TodoManager(self)
149+
self.dockerfiles = DockerfileManager(self)
150+
self.events = EventManager(self)
151+
self.audit_events = AuditEventManager(self)
152+
self.features = FeatureManager(self)
153+
self.pagesdomains = PagesDomainManager(self)
154+
self.user_activities = UserActivitiesManager(self)
137155

138156
def __enter__(self):
139157
return self

gitlab/v4/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import gitlab
2525
import gitlab.base
2626
from gitlab import cli
27-
import gitlab.v4.objects
2827

2928

3029
class GitlabCLI(object):

gitlab/v4/objects/__init__.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +0,0 @@
1-
from gitlab.v4.objects.application import * # noqa
2-
from gitlab.v4.objects.broadcast_message import * # noqa
3-
from gitlab.v4.objects.current_user import * # noqa
4-
from gitlab.v4.objects.deploy_key import * # noqa
5-
from gitlab.v4.objects.ee import * # noqa
6-
from gitlab.v4.objects.event import * # noqa
7-
from gitlab.v4.objects.feature import * # noqa
8-
from gitlab.v4.objects.group import * # noqa
9-
from gitlab.v4.objects.hook import * # noqa
10-
from gitlab.v4.objects.issue import * # noqa
11-
from gitlab.v4.objects.mergerequest import * # noqa
12-
from gitlab.v4.objects.namespace import * # noqa
13-
from gitlab.v4.objects.notification_settings import * # noqa
14-
from gitlab.v4.objects.project import * # noqa
15-
from gitlab.v4.objects.runner import * # noqa
16-
from gitlab.v4.objects.sidekiq import * # noqa
17-
from gitlab.v4.objects.snippet import * # noqa
18-
from gitlab.v4.objects.template import * # noqa
19-
from gitlab.v4.objects.todo import * # noqa
20-
from gitlab.v4.objects.user import * # noqa

gitlab/v4/objects/group.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from gitlab.exceptions import * # noqa
33
from gitlab.mixins import * # noqa
44
from gitlab import types
5-
from gitlab.v4 import objects
5+
from gitlab.v4.objects.notification_settings import NotificationSettings, NotificationSettingsManager
66
from gitlab import utils
77

88

@@ -421,11 +421,11 @@ class GroupMilestoneManager(CRUDMixin, RESTManager):
421421
_list_filters = ("iids", "state", "search")
422422

423423

424-
class GroupNotificationSettings(objects.NotificationSettings):
424+
class GroupNotificationSettings(NotificationSettings):
425425
pass
426426

427427

428-
class GroupNotificationSettingsManager(objects.NotificationSettingsManager):
428+
class GroupNotificationSettingsManager(NotificationSettingsManager):
429429
_path = "/groups/%(group_id)s/notification_settings"
430430
_obj_cls = GroupNotificationSettings
431431
_from_parent_attrs = {"group_id": "id"}

gitlab/v4/objects/hook.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
from gitlab.base import * # noqa
2+
from gitlab.exceptions import * # noqa
3+
from gitlab.mixins import * # noqa
4+
from gitlab import types
5+
from gitlab import utils
6+
7+
18
class Hook(ObjectDeleteMixin, RESTObject):
29
_url = "/hooks"
310
_short_print_attr = "url"

gitlab/v4/objects/namespace.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
from gitlab.base import * # noqa
2-
from gitlab.exceptions import * # noqa
32
from gitlab.mixins import * # noqa
4-
from gitlab import types
5-
from gitlab import utils
63

74

85
class Namespace(RESTObject):

gitlab/v4/objects/project.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,8 +1512,6 @@ class PagesDomain(RESTObject):
15121512
class PagesDomainManager(ListMixin, RESTManager):
15131513
_path = "/pages/domains"
15141514
_obj_cls = PagesDomain
1515-
=======
1516-
>>>>>>> 509394d... refactor: structure python objects in a reasonable way:gitlab/v4/objects/project.py
15171515

15181516

15191517
class ProjectRegistryRepository(ObjectDeleteMixin, RESTObject):

gitlab/v4/objects/user.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from gitlab.exceptions import * # noqa
33
from gitlab.mixins import * # noqa
44
from gitlab import types
5+
from gitlab.v4.objects.event import Event, EventManager
56
from gitlab import utils
67

78

0 commit comments

Comments
 (0)
0