mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-24 06:11:32 +08:00
fixed problem with cache duration of star imports
This commit is contained in:
@@ -13,6 +13,7 @@ import builtin
|
|||||||
import debug
|
import debug
|
||||||
import evaluate
|
import evaluate
|
||||||
import settings
|
import settings
|
||||||
|
import imports
|
||||||
|
|
||||||
|
|
||||||
class Module(builtin.CachedModule):
|
class Module(builtin.CachedModule):
|
||||||
@@ -61,6 +62,9 @@ class ModuleWithCursor(Module):
|
|||||||
""" get the parser lazy """
|
""" get the parser lazy """
|
||||||
if not self._parser:
|
if not self._parser:
|
||||||
try:
|
try:
|
||||||
|
ts, parser = builtin.CachedModule.cache[self.path]
|
||||||
|
imports.invalidate_star_import_cache(parser.module)
|
||||||
|
|
||||||
del builtin.CachedModule.cache[self.path]
|
del builtin.CachedModule.cache[self.path]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
|||||||
Reference in New Issue
Block a user