Skip to content

Commit

Permalink
renamed args to kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
ttomasz committed Jun 16, 2024
1 parent 11024e1 commit 3187663
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sshfs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(
host,
*,
pool_type=SFTPSoftChannelPool,
sftp_client_args: Optional[dict] = None,
sftp_client_kwargs: Optional[dict] = None,
**kwargs,
):
"""
Expand All @@ -53,7 +53,7 @@ def __init__(
Pool manager to use (when doing concurrent operations together,
pool managers offer the flexibility of prioritizing channels
and deciding which to use).
sftp_client_args: Optional[dict]
sftp_client_kwargs: Optional[dict]
Parameters to pass to asyncssh.SSHClientConnection.start_sftp_client method
(e.g. env, send_env, path_encoding, path_errors, sftp_version).
"""
Expand All @@ -77,7 +77,7 @@ def __init__(
max_sftp_channels=max_sessions - _SHELL_CHANNELS,
timeout=_timeout, # goes to sync_wrapper
connect_args=_client_args, # for asyncssh.connect
sftp_client_args=sftp_client_args or {}, # for asyncssh.SSHClientConnection.start_sftp_client
sftp_client_args=sftp_client_kwargs or {}, # for asyncssh.SSHClientConnection.start_sftp_client
)
weakref.finalize(
self, sync, self.loop, self._finalize, self._pool, self._stack
Expand All @@ -103,14 +103,14 @@ async def _connect(
pool_type,
max_sftp_channels,
connect_args,
sftp_client_args,
sftp_client_kwargs,
):
self._client_lock = asyncio.Semaphore(_SHELL_CHANNELS)

_raw_client = asyncssh.connect(host, **connect_args)
client = await self._stack.enter_async_context(_raw_client)
pool = pool_type(
client, max_channels=max_sftp_channels, **sftp_client_args
client, max_channels=max_sftp_channels, **sftp_client_kwargs
)
return client, pool

Expand Down

0 comments on commit 3187663

Please sign in to comment.