This commit is contained in:
Waylon Walker 2023-04-28 14:12:29 -05:00
parent 562cf35587
commit fec28df75f
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4

View file

@ -1,11 +1,8 @@
"""
pydantic_typer
"""
"""pydantic_typer."""
import inspect
from typing import Callable
from functools import wraps
from typing import Any, Callable
import typer
__all__ = ["typer"]
@ -140,7 +137,7 @@ def _expand_kwargs(func, kwargs):
def expand_pydantic_args(typer: bool = False) -> Callable:
def decorator(func: Callable) -> Callable[..., any]:
def decorator(func: Callable) -> Callable[..., Any]:
@wraps(func)
def wrapper(*args, **kwargs):
return func(**_expand_kwargs(func, kwargs))