File tree 1 file changed +4
-4
lines changed
astroid/interpreter/_import
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 15
15
import types
16
16
import warnings
17
17
import zipimport
18
- from collections .abc import Iterator , Sequence
18
+ from collections .abc import Iterable , Iterator , Sequence
19
19
from functools import lru_cache
20
20
from pathlib import Path
21
21
from typing import Any , Literal , NamedTuple , Protocol
@@ -424,7 +424,7 @@ def _find_spec_with_path(
424
424
raise ImportError (f"No module named { '.' .join (module_parts )} " )
425
425
426
426
427
- def find_spec (modpath : list [str ], path : Sequence [str ] | None = None ) -> ModuleSpec :
427
+ def find_spec (modpath : Iterable [str ], path : Iterable [str ] | None = None ) -> ModuleSpec :
428
428
"""Find a spec for the given module.
429
429
430
430
:type modpath: list or tuple
@@ -445,11 +445,11 @@ def find_spec(modpath: list[str], path: Sequence[str] | None = None) -> ModuleSp
445
445
446
446
447
447
@lru_cache (maxsize = 1024 )
448
- def _find_spec (modpath : tuple , path : tuple ) -> ModuleSpec :
448
+ def _find_spec (module_path : tuple , path : tuple ) -> ModuleSpec :
449
449
_path = path or sys .path
450
450
451
451
# Need a copy for not mutating the argument.
452
- modpath = list (modpath )
452
+ modpath = list (module_path )
453
453
454
454
submodule_path = None
455
455
module_parts = modpath [:]
You can’t perform that action at this time.
0 commit comments