From 581db5312364a9e6897cbe361ddc2056f5741375 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 25 Feb 2025 22:52:07 +0200 Subject: [PATCH 1/2] Fixed the typing of the function --- src/tap/tapify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tap/tapify.py b/src/tap/tapify.py index abd9c97..8e1a710 100644 --- a/src/tap/tapify.py +++ b/src/tap/tapify.py @@ -296,7 +296,7 @@ def to_tap_class(class_or_function: _ClassOrFunction) -> type[Tap]: def tapify( - class_or_function: Union[Callable[[InputType], OutputType], type[OutputType]], + class_or_function: Union[Callable[..., OutputType], type[OutputType]], known_only: bool = False, command_line_args: Optional[list[str]] = None, explicit_bool: bool = False, From 3c3ee97ed15a56b63d8b5f3c0a29023e501d416a Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 11 Mar 2025 20:37:04 +0200 Subject: [PATCH 2/2] Removed InputType --- src/tap/tapify.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tap/tapify.py b/src/tap/tapify.py index 8e1a710..d6bcaf7 100644 --- a/src/tap/tapify.py +++ b/src/tap/tapify.py @@ -32,10 +32,9 @@ from tap import Tap -InputType = TypeVar("InputType") OutputType = TypeVar("OutputType") -_ClassOrFunction = Union[Callable[[InputType], OutputType], type[OutputType]] +_ClassOrFunction = Union[Callable[..., OutputType], type[OutputType]] @dataclasses.dataclass