Skip to content

Commit c792bc2

Browse files
committed
Add two type ignores
1 parent 900c546 commit c792bc2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

astroid/interpreter/_import/spec.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)