Skip to content

Commit fbd2fde

Browse files
committed
fixed failing test
1 parent fa4d207 commit fbd2fde

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

docs/overview/interceptors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# **Interceptors - [(AOP) technique](https://en.wikipedia.org/wiki/Aspect-oriented_programming){target="_blank"}**
2+
Aspect Oriented Programming (AOP) technique

ellar/common/routing/controller/route.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class ControllerRouteOperation(ControllerRouteOperationBase, RouteOperation):
1212
methods: t.Set[str]
1313

14-
async def run(self, context: IExecutionContext, **kwargs: t.Any) -> t.Any:
14+
async def run(self, context: IExecutionContext, kwargs: t.Dict) -> t.Any:
1515
controller_instance = self._get_controller_instance(ctx=context)
1616
if self._is_coroutine:
1717
return await self.endpoint(controller_instance, **kwargs)

ellar/common/routing/controller/websocket/route.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ControllerWebsocketRouteOperation(
1616
def get_websocket_handler(cls) -> t.Type[ControllerWebSocketExtraHandler]:
1717
return ControllerWebSocketExtraHandler
1818

19-
async def run(self, context: IExecutionContext, **kwargs: t.Any) -> t.Any:
19+
async def run(self, context: IExecutionContext, kwargs: t.Dict) -> t.Any:
2020
controller_instance = self._get_controller_instance(ctx=context)
2121
if self._use_extra_handler:
2222
ws_extra_handler_type = (

ellar/common/routing/route.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_operation_unique_id(
106106
name=self.name, path=self.path_format, methods=_methods
107107
)
108108

109-
async def run(self, context: IExecutionContext, **kwargs: t.Any) -> t.Any:
109+
async def run(self, context: IExecutionContext, kwargs: t.Dict) -> t.Any:
110110
if self._is_coroutine:
111111
return await self.endpoint(**kwargs)
112112
else:
@@ -119,7 +119,7 @@ async def handle_request(self, context: IExecutionContext) -> t.Any:
119119
if errors:
120120
raise RequestValidationError(errors)
121121

122-
return await self.run(context, **func_kwargs)
122+
return await self.run(context, func_kwargs)
123123

124124
async def handle_response(
125125
self, context: IExecutionContext, response_obj: t.Any

ellar/common/routing/websocket/route.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def add_websocket_handler(self, handler_name: str, handler: t.Callable) -> None:
8484
)
8585
self._handlers_kwargs.update({handler_name: handler})
8686

87-
async def run(self, context: IExecutionContext, **kwargs: t.Any) -> t.Any:
87+
async def run(self, context: IExecutionContext, kwargs: t.Dict) -> t.Any:
8888
if self._use_extra_handler:
8989
ws_extra_handler_type = (
9090
self._extra_handler_type or self.get_websocket_handler()
@@ -112,7 +112,7 @@ async def handle_request(self, context: IExecutionContext) -> t.Any:
112112
await websocket.close(code=WS_1008_POLICY_VIOLATION)
113113
raise exc
114114

115-
return await self.run(context, **func_kwargs)
115+
return await self.run(context, func_kwargs)
116116

117117
async def handle_response(
118118
self, context: IExecutionContext, response_obj: t.Any

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ nav:
6868
- Guards: overview/guards.md
6969
- Custom Decorators: overview/custom_decorators.md
7070
- Module Router: overview/module-router.md
71+
- Interceptors: overview/interceptors.md
7172
- Execution Context: basics/execution-context.md
7273
- Configuration: configurations.md
7374
- How-to Guides:

0 commit comments

Comments
 (0)