diff options
author | John L. Villalovos <john@sodarock.com> | 2021-05-28 07:26:46 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2021-05-28 13:55:11 -0700 |
commit | 046607cf7fd95c3d25f5af9383fdf10a5bba42c1 (patch) | |
tree | 465472fe272baa29f0ac4c6fec8dbae4d291c7d5 /gitlab/cli.py | |
parent | 90ecf2f91129ffa0cfb5db58300fbd11638d4ecc (diff) | |
download | gitlab-046607cf7fd95c3d25f5af9383fdf10a5bba42c1.tar.gz |
chore: correct a type-hint
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 3 |
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("-", "") |