python-cq 0.15.1__tar.gz → 0.15.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.15.1 → python_cq-0.15.2}/PKG-INFO +1 -1
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/dispatcher/pipe.py +23 -18
- {python_cq-0.15.1 → python_cq-0.15.2}/pyproject.toml +1 -1
- {python_cq-0.15.1 → python_cq-0.15.2}/.gitignore +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/LICENSE +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/__init__.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/__init__.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/common/__init__.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/common/typing.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/dispatcher/__init__.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/dispatcher/base.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/dispatcher/bus.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/dispatcher/lazy.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/handler.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/message.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/middleware.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/pipetools.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/related_events.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/_core/scope.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/exceptions.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/ext/__init__.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/ext/fastapi.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/middlewares/__init__.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/middlewares/retry.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/middlewares/scope.py +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/cq/py.typed +0 -0
- {python_cq-0.15.1 → python_cq-0.15.2}/docs/index.md +0 -0
|
@@ -152,25 +152,30 @@ class ContextPipeline[I]:
|
|
|
152
152
|
if TYPE_CHECKING: # pragma: no cover
|
|
153
153
|
|
|
154
154
|
@overload
|
|
155
|
-
def __get__[
|
|
155
|
+
def __get__[Context](
|
|
156
|
+
self,
|
|
157
|
+
instance: None,
|
|
158
|
+
owner: type[Context],
|
|
159
|
+
/,
|
|
160
|
+
) -> Dispatcher[I, Context]: ...
|
|
156
161
|
|
|
157
162
|
@overload
|
|
158
|
-
def __get__[
|
|
163
|
+
def __get__[Context](
|
|
159
164
|
self,
|
|
160
|
-
instance:
|
|
161
|
-
owner: type[
|
|
165
|
+
instance: Context,
|
|
166
|
+
owner: type[Context] | None = ...,
|
|
162
167
|
/,
|
|
163
|
-
) -> Dispatcher[I,
|
|
168
|
+
) -> Dispatcher[I, Context]: ...
|
|
164
169
|
|
|
165
170
|
@overload
|
|
166
171
|
def __get__(self, instance: None = ..., owner: None = ..., /) -> Self: ...
|
|
167
172
|
|
|
168
|
-
def __get__[
|
|
173
|
+
def __get__[Context](
|
|
169
174
|
self,
|
|
170
|
-
instance:
|
|
171
|
-
owner: type[
|
|
175
|
+
instance: Context | None = None,
|
|
176
|
+
owner: type[Context] | None = None,
|
|
172
177
|
/,
|
|
173
|
-
) -> Self | Dispatcher[I,
|
|
178
|
+
) -> Self | Dispatcher[I, Context]:
|
|
174
179
|
if instance is None:
|
|
175
180
|
if owner is None:
|
|
176
181
|
return self
|
|
@@ -231,19 +236,19 @@ class ContextPipeline[I]:
|
|
|
231
236
|
|
|
232
237
|
return decorator(wrapped) if wrapped else decorator
|
|
233
238
|
|
|
234
|
-
async def __execute[
|
|
239
|
+
async def __execute[Context](
|
|
235
240
|
self,
|
|
236
241
|
input_value: I,
|
|
237
242
|
/,
|
|
238
243
|
*,
|
|
239
|
-
context:
|
|
240
|
-
context_type: type[
|
|
241
|
-
) ->
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
return
|
|
244
|
+
context: Context,
|
|
245
|
+
context_type: type[Context] | None,
|
|
246
|
+
) -> Context:
|
|
247
|
+
async def handler(i: I, /) -> Context:
|
|
248
|
+
await self.__steps.execute(i, context, context_type)
|
|
249
|
+
return context
|
|
250
|
+
|
|
251
|
+
return await self.__middleware_group.invoke(handler, input_value)
|
|
247
252
|
|
|
248
253
|
|
|
249
254
|
@dataclass(repr=False, eq=False, frozen=True, slots=True)
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|