Skip to content

Commit f05c287

Browse files
committed
refactor(api): explicitly export classes for star imports
1 parent a5a48ad commit f05c287

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+557
-9
lines changed

gitlab/base.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@
1818
import importlib
1919

2020

21+
__all__ = [
22+
"RESTObject",
23+
"RESTObjectList",
24+
"RESTManager",
25+
]
26+
27+
2128
class RESTObject(object):
2229
"""Represents an object built from server data.
2330

gitlab/mixins.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@
2323
from gitlab import utils
2424

2525

26+
__all__ = [
27+
"GetMixin",
28+
"GetWithoutIdMixin",
29+
"RefreshMixin",
30+
"ListMixin",
31+
"RetrieveMixin",
32+
"CreateMixin",
33+
"UpdateMixin",
34+
"SetMixin",
35+
"DeleteMixin",
36+
"CRUDMixin",
37+
"NoUpdateMixin",
38+
"SaveMixin",
39+
"ObjectDeleteMixin",
40+
"UserAgentDetailMixin",
41+
"AccessRequestMixin",
42+
"DownloadMixin",
43+
"SubscribableMixin",
44+
"TodoMixin",
45+
"TimeTrackingMixin",
46+
"ParticipantsMixin",
47+
"BadgeRenderMixin",
48+
]
49+
50+
2651
class GetMixin(object):
2752
@exc.on_http_error(exc.GitlabGetError)
2853
def get(self, id, lazy=False, **kwargs):

gitlab/v4/objects/access_requests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"GroupAccessRequest",
7+
"GroupAccessRequestManager",
8+
"ProjectAccessRequest",
9+
"ProjectAccessRequestManager",
10+
]
11+
12+
513
class GroupAccessRequest(AccessRequestMixin, ObjectDeleteMixin, RESTObject):
614
pass
715

gitlab/v4/objects/appearance.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
from gitlab.mixins import * # noqa
44

55

6+
__all__ = [
7+
"ApplicationAppearance",
8+
"ApplicationAppearanceManager",
9+
]
10+
11+
612
class ApplicationAppearance(SaveMixin, RESTObject):
713
_id_attr = None
814

gitlab/v4/objects/applications.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
from gitlab.base import * # noqa
22
from gitlab.mixins import * # noqa
33

4+
__all__ = [
5+
"Application",
6+
"ApplicationManager",
7+
]
8+
49

510
class Application(ObjectDeleteMixin, RESTObject):
611
_url = "/applications"

gitlab/v4/objects/award_emojis.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,22 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"ProjectIssueAwardEmoji",
7+
"ProjectIssueAwardEmojiManager",
8+
"ProjectIssueNoteAwardEmoji",
9+
"ProjectIssueNoteAwardEmojiManager",
10+
"ProjectMergeRequestAwardEmoji",
11+
"ProjectMergeRequestAwardEmojiManager",
12+
"ProjectMergeRequestNoteAwardEmoji",
13+
"ProjectMergeRequestNoteAwardEmojiManager",
14+
"ProjectSnippetAwardEmoji",
15+
"ProjectSnippetAwardEmojiManager",
16+
"ProjectSnippetNoteAwardEmoji",
17+
"ProjectSnippetNoteAwardEmojiManager",
18+
]
19+
20+
521
class ProjectIssueAwardEmoji(ObjectDeleteMixin, RESTObject):
622
pass
723

gitlab/v4/objects/badges.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"GroupBadge",
7+
"GroupBadgeManager",
8+
"ProjectBadge",
9+
"ProjectBadgeManager",
10+
]
11+
12+
513
class GroupBadge(SaveMixin, ObjectDeleteMixin, RESTObject):
614
pass
715

gitlab/v4/objects/boards.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"GroupBoardList",
7+
"GroupBoardListManager",
8+
"GroupBoard",
9+
"GroupBoardManager",
10+
"ProjectBoardList",
11+
"ProjectBoardListManager",
12+
"ProjectBoard",
13+
"ProjectBoardManager",
14+
]
15+
16+
517
class GroupBoardList(SaveMixin, ObjectDeleteMixin, RESTObject):
618
pass
719

gitlab/v4/objects/branches.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
from gitlab.mixins import * # noqa
55

66

7+
__all__ = [
8+
"ProjectBranch",
9+
"ProjectBranchManager",
10+
"ProjectProtectedBranch",
11+
"ProjectProtectedBranchManager",
12+
]
13+
14+
715
class ProjectBranch(ObjectDeleteMixin, RESTObject):
816
_id_attr = "name"
917

gitlab/v4/objects/broadcast_messages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"BroadcastMessage",
7+
"BroadcastMessageManager",
8+
]
9+
10+
511
class BroadcastMessage(SaveMixin, ObjectDeleteMixin, RESTObject):
612
pass
713

gitlab/v4/objects/clusters.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
from gitlab.mixins import * # noqa
44

55

6+
__all__ = [
7+
"GroupCluster",
8+
"GroupClusterManager",
9+
"ProjectCluster",
10+
"ProjectClusterManager",
11+
]
12+
13+
614
class GroupCluster(SaveMixin, ObjectDeleteMixin, RESTObject):
715
pass
816

gitlab/v4/objects/commits.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
from .discussions import ProjectCommitDiscussionManager
66

77

8+
__all__ = [
9+
"ProjectCommit",
10+
"ProjectCommitManager",
11+
"ProjectCommitComment",
12+
"ProjectCommitCommentManager",
13+
"ProjectCommitStatus",
14+
"ProjectCommitStatusManager",
15+
]
16+
17+
818
class ProjectCommit(RESTObject):
919
_short_print_attr = "title"
1020
_managers = (

gitlab/v4/objects/container_registry.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
from gitlab.mixins import * # noqa
55

66

7+
__all__ = [
8+
"ProjectRegistryRepository",
9+
"ProjectRegistryRepositoryManager",
10+
"ProjectRegistryTag",
11+
"ProjectRegistryTagManager",
12+
]
13+
14+
715
class ProjectRegistryRepository(ObjectDeleteMixin, RESTObject):
816
_managers = (("tags", "ProjectRegistryTagManager"),)
917

gitlab/v4/objects/custom_attributes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"GroupCustomAttribute",
7+
"GroupCustomAttributeManager",
8+
"ProjectCustomAttribute",
9+
"ProjectCustomAttributeManager",
10+
"UserCustomAttribute",
11+
"UserCustomAttributeManager",
12+
]
13+
14+
515
class GroupCustomAttribute(ObjectDeleteMixin, RESTObject):
616
_id_attr = "key"
717

gitlab/v4/objects/deploy_keys.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
from gitlab.mixins import * # noqa
55

66

7+
__all__ = [
8+
"DeployKey",
9+
"DeployKeyManager",
10+
"ProjectKey",
11+
"ProjectKeyManager",
12+
]
13+
14+
715
class DeployKey(RESTObject):
816
pass
917

gitlab/v4/objects/deploy_tokens.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"DeployToken",
7+
"DeployTokenManager",
8+
"GroupDeployToken",
9+
"GroupDeployTokenManager",
10+
"ProjectDeployToken",
11+
"ProjectDeployTokenManager",
12+
]
13+
14+
515
class DeployToken(ObjectDeleteMixin, RESTObject):
616
pass
717

gitlab/v4/objects/deployments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"ProjectDeployment",
7+
"ProjectDeploymentManager",
8+
]
9+
10+
511
class ProjectDeployment(RESTObject, SaveMixin):
612
pass
713

gitlab/v4/objects/discussions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
)
99

1010

11+
__all__ = [
12+
"ProjectCommitDiscussion",
13+
"ProjectCommitDiscussionManager",
14+
"ProjectIssueDiscussion",
15+
"ProjectIssueDiscussionManager",
16+
"ProjectMergeRequestDiscussion",
17+
"ProjectMergeRequestDiscussionManager",
18+
"ProjectSnippetDiscussion",
19+
"ProjectSnippetDiscussionManager",
20+
]
21+
22+
1123
class ProjectCommitDiscussion(RESTObject):
1224
_managers = (("notes", "ProjectCommitDiscussionNoteManager"),)
1325

gitlab/v4/objects/environments.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
from gitlab.mixins import * # noqa
55

66

7+
__all__ = [
8+
"ProjectEnvironment",
9+
"ProjectEnvironmentManager",
10+
]
11+
12+
713
class ProjectEnvironment(SaveMixin, ObjectDeleteMixin, RESTObject):
814
@cli.register_custom_action("ProjectEnvironment")
915
@exc.on_http_error(exc.GitlabStopError)

gitlab/v4/objects/epics.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
from .events import GroupEpicResourceLabelEventManager
66

77

8+
__all__ = [
9+
"GroupEpic",
10+
"GroupEpicManager",
11+
"GroupEpicIssue",
12+
"GroupEpicIssueManager",
13+
]
14+
15+
816
class GroupEpic(ObjectDeleteMixin, SaveMixin, RESTObject):
917
_id_attr = "iid"
1018
_managers = (

gitlab/v4/objects/events.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
33
from gitlab.mixins import * # noqa
44

55

6+
__all__ = [
7+
"Event",
8+
"EventManager",
9+
"AuditEvent",
10+
"AuditEventManager",
11+
"GroupEpicResourceLabelEvent",
12+
"GroupEpicResourceLabelEventManager",
13+
"ProjectEvent",
14+
"ProjectEventManager",
15+
"ProjectIssueResourceLabelEvent",
16+
"ProjectIssueResourceLabelEventManager",
17+
"ProjectIssueResourceMilestoneEvent",
18+
"ProjectIssueResourceMilestoneEventManager",
19+
"ProjectMergeRequestResourceLabelEvent",
20+
"ProjectMergeRequestResourceLabelEventManager",
21+
"ProjectMergeRequestResourceMilestoneEvent",
22+
"ProjectMergeRequestResourceMilestoneEventManager",
23+
"UserEvent",
24+
"UserEventManager",
25+
]
26+
27+
628
class Event(RESTObject):
729
_id_attr = None
830
_short_print_attr = "target_title"

gitlab/v4/objects/export_import.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
from gitlab.mixins import * # noqa
33

44

5+
__all__ = [
6+
"GroupExport",
7+
"GroupExportManager",
8+
"GroupImport",
9+
"GroupImportManager",
10+
"ProjectExport",
11+
"ProjectExportManager",
12+
"ProjectImport",
13+
"ProjectImportManager",
14+
]
15+
16+
517
class GroupExport(DownloadMixin, RESTObject):
618
_id_attr = None
719

gitlab/v4/objects/features.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1+
from gitlab import utils
12
from gitlab import exceptions as exc
23
from gitlab.base import * # noqa
34
from gitlab.mixins import * # noqa
45

56

7+
__all__ = [
8+
"Feature",
9+
"FeatureManager",
10+
]
11+
12+
613
class Feature(ObjectDeleteMixin, RESTObject):
714
_id_attr = "name"
815

0 commit comments

Comments
 (0)