Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitba3b38a

Browse files
refactor: explicitly import gitlab.const values into top-level namespace
We are planning on adding enumerated constants into gitlab/const.py,but if we do that than they will end up being added to the top-levelgitlab namespace. We really want to get users to start using`gitlab.const.` to access the constant values in the future.Explicitly add the current values defined in gitlab.const into thetop-level namespace and stop using the previous'from gitlab.const import *' method.
1 parent500895a commitba3b38a

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

‎gitlab/__init__.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,36 @@
2828
__version__,
2929
)
3030
fromgitlab.clientimportGitlab,GitlabList# noqa: F401
31-
fromgitlab.constimport*# noqa: F401,F403
31+
fromgitlab.constimport (
32+
DEFAULT_URL,
33+
DEVELOPER_ACCESS,
34+
GUEST_ACCESS,
35+
MAINTAINER_ACCESS,
36+
MINIMAL_ACCESS,
37+
NO_ACCESS,
38+
NOTIFICATION_LEVEL_CUSTOM,
39+
NOTIFICATION_LEVEL_DISABLED,
40+
NOTIFICATION_LEVEL_GLOBAL,
41+
NOTIFICATION_LEVEL_MENTION,
42+
NOTIFICATION_LEVEL_PARTICIPATING,
43+
NOTIFICATION_LEVEL_WATCH,
44+
OWNER_ACCESS,
45+
REPORTER_ACCESS,
46+
SEARCH_SCOPE_BLOBS,
47+
SEARCH_SCOPE_COMMITS,
48+
SEARCH_SCOPE_GLOBAL_SNIPPET_TITLES,
49+
SEARCH_SCOPE_ISSUES,
50+
SEARCH_SCOPE_MERGE_REQUESTS,
51+
SEARCH_SCOPE_MILESTONES,
52+
SEARCH_SCOPE_PROJECT_NOTES,
53+
SEARCH_SCOPE_PROJECTS,
54+
SEARCH_SCOPE_USERS,
55+
SEARCH_SCOPE_WIKI_BLOBS,
56+
USER_AGENT,
57+
VISIBILITY_INTERNAL,
58+
VISIBILITY_PRIVATE,
59+
VISIBILITY_PUBLIC,
60+
)
3261
fromgitlab.exceptionsimport*# noqa: F401,F403
3362

3463
warnings.filterwarnings("default",category=DeprecationWarning,module="^gitlab")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp