From 94860b2a947ebbbf8499c58e080c4e18e6c5b25e Mon Sep 17 00:00:00 2001 From: Christian Monch Date: Wed, 6 Dec 2023 18:31:40 +0100 Subject: [PATCH] fix type annotations --- datalad_next/url_operations/ssh.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/datalad_next/url_operations/ssh.py b/datalad_next/url_operations/ssh.py index 74ffd1cee..970f4921c 100644 --- a/datalad_next/url_operations/ssh.py +++ b/datalad_next/url_operations/ssh.py @@ -105,7 +105,7 @@ def stat(self, raise UrlOperationsResourceUnknown(url) return {k: v for k, v in props.items() if not k.startswith('_')} - def _get_props(self, url, stream: Generator) -> dict | None: + def _get_props(self, url, stream: Generator) -> dict: # Any stream must start with this magic marker, or we do not # recognize what is happening # after this marker, the server will send the size of the @@ -258,7 +258,7 @@ def _perform_upload(self, to_url: str, hash_names: list[str] | None, expected_size: int | None, - timeout: int | None) -> dict: + timeout: float | None) -> dict: hasher = self._get_hasher(hash_names) @@ -273,7 +273,7 @@ def _perform_upload(self, # # `iter(partial(src_fp.read, COPY_BUFSIZE), b'') # - upload_queue = Queue(maxsize=2) + upload_queue: Queue = Queue(maxsize=2) cmd = _SshCommandBuilder(to_url).get_cmd( # leave special exit code when writing fails, but not the @@ -340,7 +340,7 @@ def get_cmd(self, payload_cmd: str) -> list[str]: cmd.extend(self.ssh_args) cmd.extend([ '-e', 'none', - self._parsed.hostname, + self._parsed.hostname or '', payload_cmd.format( fdir=str(PurePosixPath(fpath).parent), fpath=fpath,