diff --git a/spyder/api/asyncdispatcher.py b/spyder/api/asyncdispatcher.py index 7091b2cc433..5a895d2dffd 100644 --- a/spyder/api/asyncdispatcher.py +++ b/spyder/api/asyncdispatcher.py @@ -84,7 +84,7 @@ def __init__(self, loop : asyncio.AbstractEventLoop, optional The event loop to be used, by default get the current event loop. early_return : bool, optional - Return the coroutine as a Future object before it is done + Return the coroutine as a Future object before it is done or wait for it to finish and return the result. return_awaitable : bool, optional Return the coroutine as an awaitable object instead of a Future. diff --git a/spyder/plugins/remoteclient/api/__init__.py b/spyder/plugins/remoteclient/api/__init__.py index 80185fc88a5..5b3501cfe26 100644 --- a/spyder/plugins/remoteclient/api/__init__.py +++ b/spyder/plugins/remoteclient/api/__init__.py @@ -101,7 +101,8 @@ class SpyderRemoteAPIManager: START_SERVER_COMMAND = ( f"/${{HOME}}/.local/bin/micromamba run -n {SERVER_ENV} spyder-server" ) - GET_SERVER_INFO_COMMAND = f"/${{HOME}}/.local/bin/micromamba run -n {SERVER_ENV} spyder-server info" + GET_SERVER_INFO_COMMAND = (f"/${{HOME}}/.local/bin/micromamba run" + f" -n {SERVER_ENV} spyder-server info") def __init__(self, conf_id, options: SSHClientOptions, _plugin=None): self._config_id = conf_id diff --git a/spyder/plugins/remoteclient/api/modules/file_services.py b/spyder/plugins/remoteclient/api/modules/file_services.py index 420608a8c31..b99aad8131c 100644 --- a/spyder/plugins/remoteclient/api/modules/file_services.py +++ b/spyder/plugins/remoteclient/api/modules/file_services.py @@ -10,10 +10,12 @@ from spyder.plugins.remoteclient.api.modules.base import SpyderBaseJupyterAPI from spyder.plugins.remoteclient.api import SpyderRemoteAPIManager -SPYDER_PLUGIN_NAME = "spyder-services" # jupyter server's extension name for spyder-remote-services +# jupyter server's extension name for spyder-remote-services +SPYDER_PLUGIN_NAME = "spyder-services" -class SpyderServicesError(Exception): ... +class SpyderServicesError(Exception): + ... class RemoteFileServicesError(SpyderServicesError): @@ -249,7 +251,7 @@ async def readlines(self, hint: int = -1) -> list[bytes | str]: async def writelines(self, lines: list[bytes | str]): """Write lines to the file.""" await self._send_request( - "writelines", lines=[self._encode_data(l) for l in lines] + "writelines", lines=list(map(self._encode_data, lines)) ) return await self._get_response() diff --git a/spyder/plugins/remoteclient/utils/installation.py b/spyder/plugins/remoteclient/utils/installation.py index 66a6be3d936..31a72500ef5 100644 --- a/spyder/plugins/remoteclient/utils/installation.py +++ b/spyder/plugins/remoteclient/utils/installation.py @@ -11,7 +11,8 @@ SERVER_ENV = "spyder-remote" PACKAGE_NAME = "spyder-remote-services" -SCRIPT_URL = f"https://raw.githubusercontent.com/spyder-ide/{PACKAGE_NAME}/master/scripts" +SCRIPT_URL = ("https://raw.githubusercontent.com/spyder-ide/" + f"{PACKAGE_NAME}/master/scripts") def get_installer_command(platform: str) -> str: