From 612fabe1d13c1c9227f43b1910998630c40d07f3 Mon Sep 17 00:00:00 2001 From: Shuto Horie Date: Thu, 19 Oct 2023 02:18:59 +0900 Subject: [PATCH] Fix tapify.py --- tap/tapify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tap/tapify.py b/tap/tapify.py index d6c29df..fbf0d9b 100644 --- a/tap/tapify.py +++ b/tap/tapify.py @@ -1,6 +1,6 @@ """Tapify module, which can initialize a class or run a function by parsing arguments from the command line.""" from inspect import signature, Parameter -from typing import Any, Callable, List, Optional, TypeVar, Union +from typing import Any, Callable, List, Optional, Type, TypeVar, Union from docstring_parser import parse @@ -10,7 +10,7 @@ OutputType = TypeVar('OutputType') -def tapify(class_or_function: Union[Callable[[InputType], OutputType], OutputType], +def tapify(class_or_function: Union[Callable[[InputType], OutputType], Type[OutputType]], known_only: bool = False, command_line_args: Optional[List[str]] = None, **func_kwargs) -> OutputType: