| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,6 +21,7 @@ | |||
| 21 | 21 | import functools | |
| 22 | 22 | import re | |
| 23 | 23 | import sys | |
| 24 | + from types import ModuleType | ||
| 24 | 25 | from typing import Any, Callable, cast, Dict, Optional, Tuple, Type, TypeVar, Union | |
| 25 | 26 | ||
| 26 | 27 | from requests.structures import CaseInsensitiveDict | |
@@ -88,7 +89,7 @@ def die(msg: str, e: Optional[Exception] = None) -> None: | |||
| 88 | 89 | sys.exit(1) | |
| 89 | 90 | ||
| 90 | 91 | ||
| 91 | - def what_to_cls(what: str, namespace: Type) -> RESTObject: | ||
| 92 | + def what_to_cls(what: str, namespace: ModuleType) -> Type[RESTObject]: | ||
| 92 | 93 | classes = CaseInsensitiveDict(namespace.__dict__) | |
| 93 | 94 | lowercase_class = what.replace("-", "") | |
| 94 | 95 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments