Skip to content

Commit

Permalink
fix type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-monch committed Dec 6, 2023
1 parent d594b1b commit 94860b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datalad_next/url_operations/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 94860b2

Please sign in to comment.