Skip to content

Commit

Permalink
Merge pull request #119 from shorie000/fix_tapify_types
Browse files Browse the repository at this point in the history
Fixed bug with incorrect type annotation of class instance created by tapify
  • Loading branch information
martinjm97 authored Oct 28, 2023
2 parents 18b13d1 + 612fabe commit 9744923
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tap/tapify.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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:
Expand Down

0 comments on commit 9744923

Please sign in to comment.