Skip to content

Commit

Permalink
Fix type annotations in Input
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Oct 16, 2024
1 parent 1e59833 commit c2e1634
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/cog/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

def Input(
default: Any = ...,
description: str = None,
ge: float = None,
le: float = None,
min_length: int = None,
max_length: int = None,
regex: str = None,
choices: List[Union[str, int]] = None,
description: Optional[str] = None,
ge: Optional[float] = None,
le: Optional[float] = None,
min_length: Optional[int] = None,
max_length: Optional[int] = None,
regex: Optional[str] = None,
choices: Optional[List[Union[str, int]]] = None,
) -> Any:
"""Input is similar to pydantic.Field, but doesn't require a default value to be the first argument."""
return Field(
Expand Down

0 comments on commit c2e1634

Please sign in to comment.