1+ from __future__ import annotations
2+
13from datetime import datetime , timezone
2- from typing import Any , Literal , Optional , TypedDict , cast
4+ from typing import Any , Generic , Literal , Optional , TypedDict , TypeVar , cast
35import httpx
46
57from .api_types_generated import (
2426from .options import InternalOptions
2527from .utils import convert_to_snake_case , parse_link_header
2628
29+ T = TypeVar ("T" )
30+ O = TypeVar ("O" ) # noqa: E741
31+
2732
2833class Revision (RevisionWithoutTimelines ):
2934 timelines : list [Timeline ]
@@ -40,7 +45,7 @@ class ExposeHTTPResult(TypedDict):
4045 domain : str
4146
4247
43- class AsyncPaginatedList [T , O ]:
48+ class AsyncPaginatedList ( Generic [T , O ]) :
4449 def __init__ (
4550 self ,
4651 client : AsyncConsoleClient ,
@@ -88,7 +93,7 @@ async def __anext__(self):
8893 return next_page
8994
9095
91- class PaginatedList [T , O ]:
96+ class PaginatedList ( Generic [T , O ]) :
9297 def __init__ (
9398 self ,
9499 bridge : AsyncBridge ,
@@ -187,7 +192,7 @@ async def delete(self, path: str) -> httpx.Response:
187192 response = await self ._request ("DELETE" , req_url )
188193 return response
189194
190- async def get_paginated [ T , O ] (
195+ async def get_paginated (
191196 self ,
192197 path : str ,
193198 cursor : Optional [str ],
@@ -379,7 +384,7 @@ def __init__(self, options: InternalOptions, bridge: AsyncBridge):
379384 self ._async = AsyncConsoleClient (options )
380385 self ._bridge = bridge
381386
382- def get_paginated [ T , O ] (
387+ def get_paginated (
383388 self , path : str , cursor : Optional [str ], params : Optional [O ] = None
384389 ) -> PaginatedList [T , O ]:
385390 async_paginated = self ._bridge .run (
0 commit comments