summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniël van Noord <13665637+DanielNoord@users.noreply.github.com>2023-05-07 23:36:49 +0200
committerDaniël van Noord <13665637+DanielNoord@users.noreply.github.com>2023-05-08 07:15:46 +0200
commitc792bc2b65f3206aea048631275b9906c005c03f (patch)
tree7c57732c4819099cd75e2b64725b22affb5b77d4
parent900c5467b80d2b5d531990d3da1d1666e9edb0f0 (diff)
downloadastroid-git-c792bc2b65f3206aea048631275b9906c005c03f.tar.gz
Add two type ignores
-rw-r--r--astroid/interpreter/_import/spec.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/astroid/interpreter/_import/spec.py b/astroid/interpreter/_import/spec.py
index 1630ca8a..b1f8e8db 100644
--- a/astroid/interpreter/_import/spec.py
+++ b/astroid/interpreter/_import/spec.py
@@ -393,7 +393,7 @@ def _find_spec_with_path(
# "type" as their __class__.__name__. We check __name__ as well
# to see if we can support the finder.
try:
- meta_finder_name = meta_finder.__name__
+ meta_finder_name = meta_finder.__name__ # type: ignore[attr-defined]
except AttributeError:
continue
if meta_finder_name not in _MetaPathFinderModuleTypes:
@@ -461,7 +461,8 @@ def find_spec(modpath: list[str], path: Sequence[str] | None = None) -> ModuleSp
submodule_path = finder.contribute_to_path(spec, processed)
# If modname is a package from an editable install, update submodule_path
# so that the next module in the path will be found inside of it using importlib.
- elif finder.__name__ in _EditableFinderClasses:
+ # Existence of __name__ is guaranteed by _find_spec_with_path.
+ elif finder.__name__ in _EditableFinderClasses: # type: ignore[attr-defined]
submodule_path = spec.submodule_search_locations
if spec.type == ModuleType.PKG_DIRECTORY: