mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +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
|
||||
|
||||
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
|
||||
|
||||
class VimPathFinder(object):
|
||||
|
Reference in New Issue
Block a user