@@ -90,7 +90,7 @@ def __init__(self, path: Sequence[str] | None = None) -> None:
90
90
@abc .abstractmethod
91
91
def find_module (
92
92
modname : str ,
93
- module_parts : tuple [str ],
93
+ module_parts : tuple [str , ... ],
94
94
processed : tuple [str , ...],
95
95
submodule_path : Sequence [str ] | None ,
96
96
) -> ModuleSpec | None :
@@ -129,7 +129,7 @@ class ImportlibFinder(Finder):
129
129
@staticmethod
130
130
def find_module (
131
131
modname : str ,
132
- module_parts : tuple [str ],
132
+ module_parts : tuple [str , ... ],
133
133
processed : tuple [str , ...],
134
134
submodule_path : Sequence [str ] | None ,
135
135
) -> ModuleSpec | None :
@@ -224,7 +224,7 @@ class ExplicitNamespacePackageFinder(ImportlibFinder):
224
224
@staticmethod
225
225
def find_module (
226
226
modname : str ,
227
- module_parts : tuple [str ],
227
+ module_parts : tuple [str , ... ],
228
228
processed : tuple [str , ...],
229
229
submodule_path : Sequence [str ] | None ,
230
230
) -> ModuleSpec | None :
@@ -264,7 +264,7 @@ def __init__(self, path: Sequence[str]) -> None:
264
264
@staticmethod
265
265
def find_module (
266
266
modname : str ,
267
- module_parts : tuple [str ],
267
+ module_parts : tuple [str , ... ],
268
268
processed : tuple [str , ...],
269
269
submodule_path : Sequence [str ] | None ,
270
270
) -> ModuleSpec | None :
@@ -288,7 +288,7 @@ class PathSpecFinder(Finder):
288
288
@staticmethod
289
289
def find_module (
290
290
modname : str ,
291
- module_parts : tuple [str ],
291
+ module_parts : tuple [str , ... ],
292
292
processed : tuple [str , ...],
293
293
submodule_path : Sequence [str ] | None ,
294
294
) -> ModuleSpec | None :
@@ -342,7 +342,7 @@ def _get_zipimporters() -> Iterator[tuple[str, zipimport.zipimporter]]:
342
342
343
343
344
344
def _search_zip (
345
- modpath : tuple [str ],
345
+ modpath : tuple [str , ... ],
346
346
) -> tuple [Literal [ModuleType .PY_ZIPMODULE ], str , str ]:
347
347
for filepath , importer in _get_zipimporters ():
348
348
if PY310_PLUS :
@@ -372,7 +372,7 @@ def _search_zip(
372
372
def _find_spec_with_path (
373
373
search_path : Sequence [str ],
374
374
modname : str ,
375
- module_parts : tuple [str ],
375
+ module_parts : tuple [str , ... ],
376
376
processed : tuple [str , ...],
377
377
submodule_path : Sequence [str ] | None ,
378
378
) -> tuple [Finder | _MetaPathFinder , ModuleSpec ]:
@@ -444,7 +444,9 @@ def find_spec(modpath: Iterable[str], path: Iterable[str] | None = None) -> Modu
444
444
445
445
446
446
@lru_cache (maxsize = 1024 )
447
- def _find_spec (module_path : tuple [str ], path : tuple [str , ...]) -> ModuleSpec :
447
+ def _find_spec (
448
+ module_path : tuple [str , ...], path : tuple [str , ...] | None
449
+ ) -> ModuleSpec :
448
450
_path = path or sys .path
449
451
450
452
# Need a copy for not mutating the argument.
0 commit comments