mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-20 20:41:13 +08:00
remove unused ModuleNotFound exception raise
This commit is contained in:
@@ -318,9 +318,6 @@ class ImportPath(pr.Base):
|
|||||||
else:
|
else:
|
||||||
sys_path_mod = list(modules.get_sys_path())
|
sys_path_mod = list(modules.get_sys_path())
|
||||||
|
|
||||||
def module_not_found():
|
|
||||||
raise ModuleNotFound('The module you searched has not been found')
|
|
||||||
|
|
||||||
current_namespace = (None, None, None)
|
current_namespace = (None, None, None)
|
||||||
# now execute those paths
|
# now execute those paths
|
||||||
rest = []
|
rest = []
|
||||||
@@ -350,10 +347,7 @@ class ImportPath(pr.Base):
|
|||||||
rest = self.import_path[i:]
|
rest = self.import_path[i:]
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
module_not_found()
|
raise ModuleNotFound('The module you searched has not been found')
|
||||||
|
|
||||||
if current_namespace == (None, None, False):
|
|
||||||
module_not_found()
|
|
||||||
|
|
||||||
sys_path_mod.pop(0) # TODO why is this here?
|
sys_path_mod.pop(0) # TODO why is this here?
|
||||||
path = current_namespace[1]
|
path = current_namespace[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user