From c2e163467980794133833b7d7fc598f252c00e61 Mon Sep 17 00:00:00 2001 From: Aron Carroll Date: Wed, 16 Oct 2024 11:37:15 +0100 Subject: [PATCH] Fix type annotations in Input --- python/cog/types.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/python/cog/types.py b/python/cog/types.py index 143a89513..0bcb0afa3 100644 --- a/python/cog/types.py +++ b/python/cog/types.py @@ -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(