Skip to content

Commit

Permalink
Use Union
Browse files Browse the repository at this point in the history
  • Loading branch information
nue-melexis committed Jan 15, 2025
1 parent f41d96f commit 4834e3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cloup/_params.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ from cloup import OptionGroup

F = TypeVar('F', bound=Callable[..., Any])
P = TypeVar('P', bound=click.Parameter)
C = TypeVar('C', bound=click.Context)
A = TypeVar('A', bound=click.Argument)
O = TypeVar('O', bound=click.Option)
C = Union[click.Context, cloup.Context]

SimpleParamTypeLike = Union[click.ParamType, Type[float], Type[int], Type[str]]
ParamTypeLike = Union[SimpleParamTypeLike, Tuple[SimpleParamTypeLike, ...]]
Expand All @@ -36,6 +34,8 @@ class Option(click.Option):
def __init__(self, *args: Any, group: Optional[OptionGroup] = None, **attrs: Any):
...

A = Union[click.Argument, Argument]
O = Union[click.Option, Option]

def argument(
*param_decls: str,
Expand Down

0 comments on commit 4834e3d

Please sign in to comment.