Skip to content

Commit 5924916

Browse files
chore: correct a type-hint
1 parent 90ecf2f commit 5924916

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gitlab/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
import functools
2222
import re
2323
import sys
24-
from typing import Any, Callable, cast, Dict, Optional, Tuple, Type, TypeVar, Union
24+
from types import ModuleType
25+
from typing import Any, Callable, cast, Dict, Optional, Tuple, TypeVar, Union
2526

2627
from requests.structures import CaseInsensitiveDict
2728

@@ -88,7 +89,7 @@ def die(msg: str, e: Optional[Exception] = None) -> None:
8889
sys.exit(1)
8990

9091

91-
def what_to_cls(what: str, namespace: Type) -> RESTObject:
92+
def what_to_cls(what: str, namespace: ModuleType) -> RESTObject:
9293
classes = CaseInsensitiveDict(namespace.__dict__)
9394
lowercase_class = what.replace("-", "")
9495

0 commit comments

Comments
 (0)