type-hint some Callables

could not figure out how to type-hint coinchooser.sufficient_funds with typing.Protocol,
at least PyCharm complained on all my attempts
This commit is contained in:
SomberNight
2025-08-18 15:38:25 +00:00
parent 0c6ff6ab62
commit f8926b4957
5 changed files with 47 additions and 23 deletions

View File

@@ -275,8 +275,8 @@ class CosignerWallet(Logger):
tx: Union['Transaction', 'PartialTransaction'],
*,
label: str = None,
on_failure: Callable = None,
on_success: Callable = None
on_failure: Callable[[str], None] = None,
on_success: Callable[[], None] = None
) -> None:
try:
# TODO: adding tx should be handled more gracefully here: