summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-05-29 13:05:48 +0200
committerGitHub <noreply@github.com>2021-05-29 13:05:48 +0200
commit8eb911d6fd7bf95ed50bd893350ce997cbc31558 (patch)
tree465472fe272baa29f0ac4c6fec8dbae4d291c7d5
parent90ecf2f91129ffa0cfb5db58300fbd11638d4ecc (diff)
parent046607cf7fd95c3d25f5af9383fdf10a5bba42c1 (diff)
downloadgitlab-8eb911d6fd7bf95ed50bd893350ce997cbc31558.tar.gz
Merge pull request #1480 from JohnVillalovos/jlvillal/fix_hint
chore: correct a type-hint
-rw-r--r--gitlab/cli.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index 7ae3137..a5044ff 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -21,6 +21,7 @@ import argparse
import functools
import re
import sys
+from types import ModuleType
from typing import Any, Callable, cast, Dict, Optional, Tuple, Type, TypeVar, Union
from requests.structures import CaseInsensitiveDict
@@ -88,7 +89,7 @@ def die(msg: str, e: Optional[Exception] = None) -> None:
sys.exit(1)
-def what_to_cls(what: str, namespace: Type) -> RESTObject:
+def what_to_cls(what: str, namespace: ModuleType) -> Type[RESTObject]:
classes = CaseInsensitiveDict(namespace.__dict__)
lowercase_class = what.replace("-", "")