File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
astroid/interpreter/_import Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ def _find_spec_with_path(
393393 # "type" as their __class__.__name__. We check __name__ as well
394394 # to see if we can support the finder.
395395 try :
396- meta_finder_name = meta_finder .__name__
396+ meta_finder_name = meta_finder .__name__ # type: ignore[attr-defined]
397397 except AttributeError :
398398 continue
399399 if meta_finder_name not in _MetaPathFinderModuleTypes :
@@ -461,7 +461,8 @@ def find_spec(modpath: list[str], path: Sequence[str] | None = None) -> ModuleSp
461461 submodule_path = finder .contribute_to_path (spec , processed )
462462 # If modname is a package from an editable install, update submodule_path
463463 # so that the next module in the path will be found inside of it using importlib.
464- elif finder .__name__ in _EditableFinderClasses :
464+ # Existence of __name__ is guaranteed by _find_spec_with_path.
465+ elif finder .__name__ in _EditableFinderClasses : # type: ignore[attr-defined]
465466 submodule_path = spec .submodule_search_locations
466467
467468 if spec .type == ModuleType .PKG_DIRECTORY :
You can’t perform that action at this time.
0 commit comments