summaryrefslogtreecommitdiff
path: root/gitlab/base.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-01-03 22:11:46 -0800
committerJohn L. Villalovos <john@sodarock.com>2022-01-03 22:11:46 -0800
commit6b3e7c0f5f77baed94cc807b7087feaaf0fac121 (patch)
treea9d8d3b3f04b072e6707f775861e1835e94afc8d /gitlab/base.py
parent789122d5df9b4f39331e23c7fdb6e9021e7836cf (diff)
downloadgitlab-jlvillal/relative_imports.tar.gz
chore: convert to using relative importsjlvillal/relative_imports
Switch to using relative imports to ensure that we are importing from within our library. Also use the form: from foo import bar as bar When we want to signify that we want the import to be re-exported. https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-no-implicit-reexport
Diffstat (limited to 'gitlab/base.py')
-rw-r--r--gitlab/base.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/gitlab/base.py b/gitlab/base.py
index 50f09c5..8b97bfd 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -20,11 +20,10 @@ import textwrap
from types import ModuleType
from typing import Any, Dict, Iterable, NamedTuple, Optional, Tuple, Type
-import gitlab
-from gitlab import types as g_types
-from gitlab.exceptions import GitlabParsingError
-
from .client import Gitlab, GitlabList
+from .exceptions import GitlabParsingError
+from .types import GitlabAttribute
+from .version import __version__
__all__ = [
"RequiredOptional",
@@ -35,7 +34,7 @@ __all__ = [
_URL_ATTRIBUTE_ERROR = (
- f"https://python-gitlab.readthedocs.io/en/{gitlab.__version__}/"
+ f"https://python-gitlab.readthedocs.io/en/{__version__}/"
f"faq.html#attribute-error-list"
)
@@ -317,7 +316,7 @@ class RESTManager(object):
_path: Optional[str] = None
_obj_cls: Optional[Type[RESTObject]] = None
_from_parent_attrs: Dict[str, Any] = {}
- _types: Dict[str, Type[g_types.GitlabAttribute]] = {}
+ _types: Dict[str, Type[GitlabAttribute]] = {}
_computed_path: Optional[str]
_parent: Optional[RESTObject]