mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
python: VimModuleLoader: check sys.modules[fullname]
This is required by PEP302 for `reload()`ing modules.
This commit is contained in:
@@ -212,6 +212,9 @@ def path_hook(nvim):
|
|||||||
self.module = module
|
self.module = module
|
||||||
|
|
||||||
def load_module(self, fullname, path=None):
|
def load_module(self, fullname, path=None):
|
||||||
|
# Check sys.modules, required for reload (see PEP302).
|
||||||
|
if fullname in sys.modules:
|
||||||
|
return sys.modules[fullname]
|
||||||
return self.module
|
return self.module
|
||||||
|
|
||||||
class VimPathFinder(object):
|
class VimPathFinder(object):
|
||||||
|
Reference in New Issue
Block a user