Skip to content

Consider exposing gitlab.const? #3351

@stdedos

Description

@stdedos

Description of the problem, including code/CLI snippet

Doing import gitlab (assuming it's the main way of using this) triggers "notices" when trying to use e.g. gitlab.const.AccessLevel.DEVELOPER

I assume the reason is

__all__ = [
"__author__",
"__copyright__",
"__email__",
"__license__",
"__title__",
"__version__",
"Gitlab",
"GitlabList",
"AsyncGraphQL",
"GraphQL",
]
__all__.extend(gitlab.exceptions.__all__)

Expected Behavior

Typing

import gitlab

gitlab.const.AccessLevel.DEVELOPER

does not raise issues.

from gitlab import Gitlab, const works

Actual Behavior

Cannot find reference 'const' in 'gitlab' 

Specifications

  • python-gitlab version: 8
  • Gitlab server version (or gitlab.com):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions