From 046607cf7fd95c3d25f5af9383fdf10a5bba42c1 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Fri, 28 May 2021 07:26:46 -0700 Subject: [PATCH] chore: correct a type-hint --- gitlab/cli.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitlab/cli.py b/gitlab/cli.py index 7ae31377b..a5044ffda 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -21,6 +21,7 @@ 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("-", "")