Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a80e73f

Browse files
committed
Utils and extras updates
1 parent 22be930 commit a80e73f

14 files changed

+379
-374
lines changed

ssh2/agent.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/channel.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/extras.c

+50-21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/extras.pyi

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from typing import Callable, Any, ParamSpecArgs, ParamSpecKwargs
2+
3+
def eagain_errcode(func: Callable, poller_func: Callable, *args: ParamSpecArgs, **kwargs: ParamSpecKwargs) -> Any: ...
4+
def eagain_write_errcode(write_func: Callable, poller_func: Callable, data: bytes) -> None: ...

ssh2/extras.pyx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
22
Additional functionality not part of the libssh2 API.
33
"""
4-
from typing import Callable, Any
4+
from typing import Callable, Any, ParamSpecArgs, ParamSpecKwargs
55

66
from . cimport error_codes
77
from .utils import find_eol
88

99

10-
def eagain_errcode(func: Callable, poller_func: Callable, *args, **kwargs) -> Any:
10+
def eagain_errcode(func: Callable, poller_func: Callable, *args: ParamSpecArgs, **kwargs: ParamSpecKwargs) -> Any:
1111
"""Helper function for reading in non-blocking mode.
1212

1313
Any additional arguments and keyword arguments provided are used as arguments to the session function `func`.
@@ -26,7 +26,7 @@ def eagain_errcode(func: Callable, poller_func: Callable, *args, **kwargs) -> An
2626
return ret
2727

2828

29-
def eagain_write_errcode(write_func: Callable, poller_func: Callable, bytes data: bytes) -> None:
29+
def eagain_write_errcode(write_func: Callable, poller_func: Callable, bytes data) -> None:
3030
"""Helper function for writing in non-blocking mode.
3131

3232
Any additional arguments and keyword arguments provided are used as arguments to the session function `write_func`.

ssh2/knownhost.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/listener.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/publickey.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/session.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/sftp.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/sftp_handle.c

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)