diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-12-01 01:13:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-01 01:13:30 +0100 |
commit | e6582a37a691880a69a75a347389eb4e4e95b20e (patch) | |
tree | 51d07a20421b89642f263c08f5cea61ca4924e61 /gitlab/const.py | |
parent | 09a973ee379d82af05a5080decfaec16d2f4eab3 (diff) | |
parent | b3b0b5f1da5b9da9bf44eac33856ed6eadf37dd6 (diff) | |
download | gitlab-e6582a37a691880a69a75a347389eb4e4e95b20e.tar.gz |
Merge pull request #1694 from python-gitlab/jlvillal/const_explicit
refactor: explicitly import gitlab.const values into top-level namespace
Diffstat (limited to 'gitlab/const.py')
-rw-r--r-- | gitlab/const.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/gitlab/const.py b/gitlab/const.py index 12faf88..48aa96d 100644 --- a/gitlab/const.py +++ b/gitlab/const.py @@ -17,6 +17,41 @@ from gitlab.__version__ import __title__, __version__ +# NOTE(jlvillal): '_DEPRECATED' only affects users accessing constants via the +# top-level gitlab.* namespace. See 'gitlab/__init__.py:__getattr__()' for the +# consumer of '_DEPRECATED' For example 'x = gitlab.NO_ACCESS'. We want users +# to instead use constants by doing code like: gitlab.const.NO_ACCESS. +_DEPRECATED = [ + "DEFAULT_URL", + "DEVELOPER_ACCESS", + "GUEST_ACCESS", + "MAINTAINER_ACCESS", + "MINIMAL_ACCESS", + "NO_ACCESS", + "NOTIFICATION_LEVEL_CUSTOM", + "NOTIFICATION_LEVEL_DISABLED", + "NOTIFICATION_LEVEL_GLOBAL", + "NOTIFICATION_LEVEL_MENTION", + "NOTIFICATION_LEVEL_PARTICIPATING", + "NOTIFICATION_LEVEL_WATCH", + "OWNER_ACCESS", + "REPORTER_ACCESS", + "SEARCH_SCOPE_BLOBS", + "SEARCH_SCOPE_COMMITS", + "SEARCH_SCOPE_GLOBAL_SNIPPET_TITLES", + "SEARCH_SCOPE_ISSUES", + "SEARCH_SCOPE_MERGE_REQUESTS", + "SEARCH_SCOPE_MILESTONES", + "SEARCH_SCOPE_PROJECT_NOTES", + "SEARCH_SCOPE_PROJECTS", + "SEARCH_SCOPE_USERS", + "SEARCH_SCOPE_WIKI_BLOBS", + "USER_AGENT", + "VISIBILITY_INTERNAL", + "VISIBILITY_PRIVATE", + "VISIBILITY_PUBLIC", +] + DEFAULT_URL: str = "https://gitlab.com" NO_ACCESS: int = 0 |