94
94
Response = Coroutine [Any , Any , T ] # pyright: ignore [reportExplicitAny]
95
95
96
96
API_VERSION : int = 10
97
- BM = TypeVar ("BM" , bound = type [ "BaseModel" ] )
97
+ BM = TypeVar ("BM" , bound = "BaseModel" )
98
98
99
99
100
100
async def json_or_text (response : aiohttp .ClientResponse ) -> dict [str , Any ] | str :
@@ -227,7 +227,7 @@ async def request(
227
227
* ,
228
228
files : Sequence [File ] | None = None ,
229
229
form : Iterable [dict [str , Any ]] | None = None ,
230
- model : None = None ,
230
+ model : None ,
231
231
** kwargs : Any ,
232
232
) -> Any : ...
233
233
@@ -238,16 +238,17 @@ async def request(
238
238
* ,
239
239
files : None = ...,
240
240
form : None = ...,
241
- model : BM ,
241
+ model : type [ BM ] ,
242
242
** kwargs : Any ,
243
243
) -> BM : ...
244
+
244
245
async def request (
245
246
self ,
246
247
route : Route ,
247
248
* ,
248
249
files : Sequence [File ] | None = None ,
249
250
form : Iterable [dict [str , Any ]] | None = None ,
250
- model : BM | None = None ,
251
+ model : type [ BM ] | None = None ,
251
252
** kwargs : Any ,
252
253
) -> Any | BM :
253
254
bucket = route .bucket
@@ -347,8 +348,8 @@ async def request(
347
348
_log .debug ("%s %s has received %s" , method , url , data )
348
349
if model :
349
350
return model (
350
- ** data
351
- ) # pyright: ignore [reportCallIssue]
351
+ ** data # pyright: ignore [reportCallIssue]
352
+ )
352
353
return data
353
354
354
355
# we are being rate limited
0 commit comments