python-cq 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cq-0.1.0 → python_cq-0.1.2}/PKG-INFO +1 -1
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/middleware.py +8 -7
- python_cq-0.1.2/cq/py.typed +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/pyproject.toml +1 -1
- {python_cq-0.1.0 → python_cq-0.1.2}/README.md +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/__init__.py +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/__init__.py +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/bus.py +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/command.py +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/dto.py +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/event.py +0 -0
- {python_cq-0.1.0 → python_cq-0.1.2}/cq/_core/query.py +0 -0
|
@@ -19,7 +19,7 @@ class MiddlewareGroup[**P, T]:
|
|
|
19
19
|
return iter(self.__middlewares)
|
|
20
20
|
|
|
21
21
|
def add(self, *middlewares: Middleware[P, T]) -> Self:
|
|
22
|
-
self.__middlewares.extend(middlewares)
|
|
22
|
+
self.__middlewares.extend(reversed(middlewares))
|
|
23
23
|
return self
|
|
24
24
|
|
|
25
25
|
async def invoke(
|
|
@@ -44,12 +44,13 @@ class MiddlewareGroup[**P, T]:
|
|
|
44
44
|
try:
|
|
45
45
|
await anext(generator)
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
while True:
|
|
48
|
+
try:
|
|
49
|
+
value = await handler(*args, **kwargs)
|
|
50
|
+
except BaseException as exc:
|
|
51
|
+
await generator.athrow(exc)
|
|
52
|
+
else:
|
|
53
|
+
await generator.asend(value)
|
|
53
54
|
|
|
54
55
|
except StopAsyncIteration:
|
|
55
56
|
...
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|