@@ -238,8 +238,8 @@ def __init__(
238
238
self .app = endpoint
239
239
240
240
if middleware is not None :
241
- for cls , options in reversed (middleware ):
242
- self .app = cls (app = self .app , ** options )
241
+ for cls , args , kwargs in reversed (middleware ):
242
+ self .app = cls (app = self .app , * args , ** kwargs )
243
243
244
244
if methods is None :
245
245
self .methods = None
@@ -335,8 +335,8 @@ def __init__(
335
335
self .app = endpoint
336
336
337
337
if middleware is not None :
338
- for cls , options in reversed (middleware ):
339
- self .app = cls (app = self .app , ** options )
338
+ for cls , args , kwargs in reversed (middleware ):
339
+ self .app = cls (app = self .app , * args , ** kwargs )
340
340
341
341
self .path_regex , self .path_format , self .param_convertors = compile_path (path )
342
342
@@ -404,8 +404,8 @@ def __init__(
404
404
self ._base_app = Router (routes = routes )
405
405
self .app = self ._base_app
406
406
if middleware is not None :
407
- for cls , options in reversed (middleware ):
408
- self .app = cls (app = self .app , ** options )
407
+ for cls , args , kwargs in reversed (middleware ):
408
+ self .app = cls (app = self .app , * args , ** kwargs )
409
409
self .name = name
410
410
self .path_regex , self .path_format , self .param_convertors = compile_path (
411
411
self .path + "/{path:path}"
@@ -672,8 +672,8 @@ def __init__(
672
672
673
673
self .middleware_stack = self .app
674
674
if middleware :
675
- for cls , options in reversed (middleware ):
676
- self .middleware_stack = cls (self .middleware_stack , ** options )
675
+ for cls , args , kwargs in reversed (middleware ):
676
+ self .middleware_stack = cls (self .middleware_stack , * args , ** kwargs )
677
677
678
678
async def not_found (self , scope : Scope , receive : Receive , send : Send ) -> None :
679
679
if scope ["type" ] == "websocket" :
0 commit comments