We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7864496 commit 1f475cbCopy full SHA for 1f475cb
astroid/interpreter/_import/util.py
@@ -78,12 +78,8 @@ def is_namespace(modname: str) -> bool:
78
79
# Repair last_submodule_search_locations
80
if last_submodule_search_locations:
81
- # TODO: py38: remove except
82
- try:
83
- # pylint: disable=unsubscriptable-object
84
- last_item = last_submodule_search_locations[-1]
85
- except TypeError:
86
- last_item = last_submodule_search_locations._recalculate()[-1]
+ # pylint: disable=unsubscriptable-object
+ last_item = last_submodule_search_locations[-1]
87
# e.g. for failure example above, add 'a/b' and keep going
88
# so that find_spec('a.b.c', path=['a', 'a/b']) succeeds
89
assumed_location = pathlib.Path(last_item) / component
0 commit comments