|
27 | 27 | import time
|
28 | 28 | import re
|
29 | 29 | import types
|
30 |
| -from typing import Any, Dict, List, Protocol |
| 30 | +from typing import Any, Callable, Dict, Iterable, List, Protocol, Optional |
31 | 31 | import zipfile
|
32 | 32 | import zipimport
|
33 | 33 | import warnings
|
@@ -2021,7 +2021,9 @@ def __init__(self, importer):
|
2021 | 2021 | self._setup_prefix()
|
2022 | 2022 |
|
2023 | 2023 |
|
2024 |
| -_distribution_finders = {} |
| 2024 | +_distribution_finders: Dict[ |
| 2025 | + type, Callable[[object, str, bool], Iterable["Distribution"]] |
| 2026 | +] = {} |
2025 | 2027 | _declare_state('dict', _distribution_finders=_distribution_finders)
|
2026 | 2028 |
|
2027 | 2029 |
|
@@ -2195,9 +2197,11 @@ def resolve_egg_link(path):
|
2195 | 2197 |
|
2196 | 2198 | register_finder(importlib.machinery.FileFinder, find_on_path)
|
2197 | 2199 |
|
2198 |
| -_namespace_handlers = {} |
| 2200 | +_namespace_handlers: Dict[ |
| 2201 | + type, Callable[[object, str, str, types.ModuleType], Optional[str]] |
| 2202 | +] = {} |
2199 | 2203 | _declare_state('dict', _namespace_handlers=_namespace_handlers)
|
2200 |
| -_namespace_packages = {} |
| 2204 | +_namespace_packages: Dict[Optional[str], List[str]] = {} |
2201 | 2205 | _declare_state('dict', _namespace_packages=_namespace_packages)
|
2202 | 2206 |
|
2203 | 2207 |
|
|
0 commit comments