@@ -241,7 +241,7 @@ def _find_collection_response(op: Operation) -> Tuple[int, Any]:
241
241
class Cursor :
242
242
offset : int = 0
243
243
reverse : bool = False
244
- position : str | None = None
244
+ position : Optional [ str ] = None
245
245
246
246
247
247
def _clamp (val : int , min_ : int , max_ : int ) -> int :
@@ -272,14 +272,14 @@ def _replace_query_param(url: str, key: str, val: str):
272
272
273
273
class CursorPagination (PaginationBase ):
274
274
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 (
277
277
None , description = _ ("The pagination cursor value." ), validate_default = True
278
278
)
279
279
280
280
@field_validator ("cursor" )
281
281
@classmethod
282
- def decode_cursor (cls , encoded_cursor : str | None ) -> Cursor :
282
+ def decode_cursor (cls , encoded_cursor : Optional [ str ] ) -> Cursor :
283
283
if encoded_cursor is None :
284
284
return Cursor ()
285
285
@@ -300,10 +300,10 @@ def decode_cursor(cls, encoded_cursor: str | None) -> Cursor:
300
300
return Cursor (offset = offset , reverse = reverse , position = position )
301
301
302
302
class Output (Schema ):
303
- results : list [Any ] = Field (description = _ ("The page of objects." ))
303
+ results : List [Any ] = Field (description = _ ("The page of objects." ))
304
304
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 (
307
307
description = _ ("URL of previous page of results if there is one." )
308
308
)
309
309
0 commit comments