satori-python-client 0.11.3__tar.gz → 0.11.4__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.
@@ -1,5 +1,5 @@
1
1
  includes = ["src/satori/client"]
2
- raw-dependencies = ["satori-python-core >= 0.11.3"]
2
+ raw-dependencies = ["satori-python-core >= 0.11.4"]
3
3
 
4
4
  [project]
5
5
  name = "satori-python-client"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python-client
3
- Version: 0.11.3
3
+ Version: 0.11.4
4
4
  Summary: Satori Protocol SDK for python, specify client part
5
5
  Home-page: https://github.com/RF-Tar-Railt/satori-python
6
6
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
@@ -19,7 +19,7 @@ Project-URL: Repository, https://github.com/RF-Tar-Railt/satori-python
19
19
  Requires-Python: >=3.8
20
20
  Requires-Dist: aiohttp>=3.9.3
21
21
  Requires-Dist: launart>=0.8.2
22
- Requires-Dist: satori-python-core>=0.11.3
22
+ Requires-Dist: satori-python-core>=0.11.4
23
23
  Description-Content-Type: text/markdown
24
24
 
25
25
  # satori-python
@@ -7,7 +7,7 @@ authors = [
7
7
  dependencies = [
8
8
  "aiohttp>=3.9.3",
9
9
  "launart>=0.8.2",
10
- "satori-python-core >= 0.11.3",
10
+ "satori-python-core >= 0.11.4",
11
11
  ]
12
12
  description = "Satori Protocol SDK for python, specify client part"
13
13
  readme = "README.md"
@@ -23,7 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.12",
24
24
  "Operating System :: OS Independent",
25
25
  ]
26
- version = "0.11.3"
26
+ version = "0.11.4"
27
27
 
28
28
  [project.license]
29
29
  text = "MIT"
@@ -152,13 +152,20 @@ class App(Service):
152
152
  Callable[[Account, event.InternalEvent], Awaitable[Any]],
153
153
  ]: ...
154
154
 
155
- def register_on(self, event_type: EventType):
155
+ @overload
156
+ def register_on(
157
+ self, event_type: str
158
+ ) -> Callable[
159
+ [Callable[[Account, Event], Awaitable[Any]]], Callable[[Account, Event], Awaitable[Any]]
160
+ ]: ...
161
+
162
+ def register_on(self, event_type: str | EventType):
156
163
  def decorator(
157
164
  func: Callable[[Account, Any], Awaitable[Any]], /
158
165
  ) -> Callable[[Account, Any], Awaitable[Any]]:
159
166
  @wraps(func)
160
167
  async def wrapper(account: Account, event: Event) -> Any:
161
- if event.type == event_type.value:
168
+ if event.type == event_type:
162
169
  return await func(account, event)
163
170
 
164
171
  self.register(wrapper)