python-cq 0.7.1.post0__tar.gz → 0.7.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.7.1.post0 → python_cq-0.7.2}/PKG-INFO +2 -2
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/README.md +1 -1
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/dispatcher/pipe.py +19 -1
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/handler.py +22 -1
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/pyproject.toml +1 -1
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/.gitignore +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/LICENSE +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/__init__.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/__init__.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/dispatcher/__init__.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/dispatcher/base.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/dispatcher/bus.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/message.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/middleware.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/related_events.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/_core/scope.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/exceptions.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/middlewares/__init__.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/middlewares/retry.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/middlewares/scope.py +0 -0
- {python_cq-0.7.1.post0 → python_cq-0.7.2}/cq/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cq
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Lightweight CQRS library.
|
|
5
5
|
Project-URL: Repository, https://github.com/100nm/python-cq
|
|
6
6
|
Author: remimd
|
|
@@ -28,7 +28,7 @@ Description-Content-Type: text/markdown
|
|
|
28
28
|
# python-cq
|
|
29
29
|
|
|
30
30
|
[](https://github.com/100nm/python-cq)
|
|
31
|
-
[](https://pypi.org/project/python-cq
|
|
31
|
+
[](https://pypi.org/project/python-cq)
|
|
32
32
|
[](https://pypistats.org/packages/python-cq)
|
|
33
33
|
[](https://github.com/astral-sh/ruff)
|
|
34
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# python-cq
|
|
2
2
|
|
|
3
3
|
[](https://github.com/100nm/python-cq)
|
|
4
|
-
[](https://pypi.org/project/python-cq
|
|
4
|
+
[](https://pypi.org/project/python-cq)
|
|
5
5
|
[](https://pypistats.org/packages/python-cq)
|
|
6
6
|
[](https://github.com/astral-sh/ruff)
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from collections.abc import Awaitable, Callable
|
|
2
2
|
from dataclasses import dataclass, field
|
|
3
|
-
from typing import Any, Self
|
|
3
|
+
from typing import Any, Self, overload
|
|
4
4
|
|
|
5
5
|
from cq._core.dispatcher.base import BaseDispatcher, Dispatcher
|
|
6
6
|
|
|
@@ -24,6 +24,24 @@ class Pipe[I, O](BaseDispatcher[I, O]):
|
|
|
24
24
|
self.__dispatcher = dispatcher
|
|
25
25
|
self.__steps = []
|
|
26
26
|
|
|
27
|
+
@overload
|
|
28
|
+
def step[T](
|
|
29
|
+
self,
|
|
30
|
+
wrapped: PipeConverter[T, Any],
|
|
31
|
+
/,
|
|
32
|
+
*,
|
|
33
|
+
dispatcher: Dispatcher[T, Any] | None = ...,
|
|
34
|
+
) -> PipeConverter[T, Any]: ...
|
|
35
|
+
|
|
36
|
+
@overload
|
|
37
|
+
def step[T](
|
|
38
|
+
self,
|
|
39
|
+
wrapped: None = ...,
|
|
40
|
+
/,
|
|
41
|
+
*,
|
|
42
|
+
dispatcher: Dispatcher[T, Any] | None = ...,
|
|
43
|
+
) -> Callable[[PipeConverter[T, Any]], PipeConverter[T, Any]]: ...
|
|
44
|
+
|
|
27
45
|
def step[T](
|
|
28
46
|
self,
|
|
29
47
|
wrapped: PipeConverter[T, Any] | None = None,
|
|
@@ -5,7 +5,7 @@ from dataclasses import dataclass, field
|
|
|
5
5
|
from functools import partial
|
|
6
6
|
from inspect import Parameter, getmro, isclass
|
|
7
7
|
from inspect import signature as inspect_signature
|
|
8
|
-
from typing import Any, Protocol, Self, runtime_checkable
|
|
8
|
+
from typing import Any, Protocol, Self, overload, runtime_checkable
|
|
9
9
|
|
|
10
10
|
import injection
|
|
11
11
|
|
|
@@ -89,6 +89,27 @@ class HandlerDecorator[I, O]:
|
|
|
89
89
|
manager: HandlerManager[I, O]
|
|
90
90
|
injection_module: injection.Module = field(default_factory=injection.mod)
|
|
91
91
|
|
|
92
|
+
@overload
|
|
93
|
+
def __call__(
|
|
94
|
+
self,
|
|
95
|
+
input_or_handler_type: type[I],
|
|
96
|
+
/,
|
|
97
|
+
) -> Callable[[HandlerType[[I], O]], HandlerType[[I], O]]: ...
|
|
98
|
+
|
|
99
|
+
@overload
|
|
100
|
+
def __call__(
|
|
101
|
+
self,
|
|
102
|
+
input_or_handler_type: HandlerType[[I], O],
|
|
103
|
+
/,
|
|
104
|
+
) -> HandlerType[[I], O]: ...
|
|
105
|
+
|
|
106
|
+
@overload
|
|
107
|
+
def __call__(
|
|
108
|
+
self,
|
|
109
|
+
input_or_handler_type: None = ...,
|
|
110
|
+
/,
|
|
111
|
+
) -> Callable[[HandlerType[[I], O]], HandlerType[[I], O]]: ...
|
|
112
|
+
|
|
92
113
|
def __call__(
|
|
93
114
|
self,
|
|
94
115
|
input_or_handler_type: type[I] | HandlerType[[I], O] | None = None,
|
|
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
|