@@ -241,7 +241,7 @@ def _find_collection_response(op: Operation) -> Tuple[int, Any]:
241241class Cursor :
242242 offset : int = 0
243243 reverse : bool = False
244- position : str | None = None
244+ position : Optional [ str ] = None
245245
246246
247247def _clamp (val : int , min_ : int , max_ : int ) -> int :
@@ -272,14 +272,14 @@ def _replace_query_param(url: str, key: str, val: str):
272272
273273class CursorPagination (PaginationBase ):
274274 class Input (Schema ):
275- limit : int | None = Field (None , description = _ ("Number of results to return per page." ))
276- cursor : str | None = Field (
275+ limit : Optional [ int ] = Field (None , description = _ ("Number of results to return per page." ))
276+ cursor : Optional [ str ] = Field (
277277 None , description = _ ("The pagination cursor value." ), validate_default = True
278278 )
279279
280280 @field_validator ("cursor" )
281281 @classmethod
282- def decode_cursor (cls , encoded_cursor : str | None ) -> Cursor :
282+ def decode_cursor (cls , encoded_cursor : Optional [ str ] ) -> Cursor :
283283 if encoded_cursor is None :
284284 return Cursor ()
285285
@@ -300,10 +300,10 @@ def decode_cursor(cls, encoded_cursor: str | None) -> Cursor:
300300 return Cursor (offset = offset , reverse = reverse , position = position )
301301
302302 class Output (Schema ):
303- results : list [Any ] = Field (description = _ ("The page of objects." ))
303+ results : List [Any ] = Field (description = _ ("The page of objects." ))
304304 count : int = Field (description = _ ("The total number of results across all pages." ))
305- next : str | None = Field (description = _ ("URL of next page of results if there is one." ))
306- previous : str | None = Field (
305+ next : Optional [ str ] = Field (description = _ ("URL of next page of results if there is one." ))
306+ previous : Optional [ str ] = Field (
307307 description = _ ("URL of previous page of results if there is one." )
308308 )
309309
0 commit comments