Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def session(transport_type='stdio', *args, **kwargs):
loop = EventLoop(transport_type, *args, **kwargs)
msgpack_stream = MsgpackStream(loop)
async_session = AsyncSession(msgpack_stream)
session = Session(async_session)
session.request(b'nvim_set_client_info',
*get_client_info('client', 'remote', {}), async_=True)
return session
self._discover_classes(module, handlers, path)
self._discover_functions(module, handlers, path, False)
if not handlers:
error('{} exports no handlers'.format(path))
continue
self._loaded[path] = {'handlers': handlers, 'module': module}
except Exception as e:
err = ('Encountered {} loading plugin at {}: {}\n{}'
.format(type(e).__name__, path, e, format_exc(5)))
error(err)
self._load_errors[path] = err
kind = ("script-host" if len(plugins) == 1 and has_script
else "rplugin-host")
self.nvim.api.set_client_info(
*get_client_info(kind, 'host', host_method_spec),
async_=True)