satori-python-adapter-onebot11 0.2.0__tar.gz → 0.2.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.
Files changed (17) hide show
  1. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/.mina/adapter_onebot11.toml +2 -2
  2. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/PKG-INFO +3 -2
  3. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/README.md +1 -0
  4. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/pyproject.toml +7 -5
  5. satori_python_adapter_onebot11-0.2.2/src/satori/adapters/onebot11/events/__init__.py +4 -0
  6. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/forward.py +1 -1
  7. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/reverse.py +2 -2
  8. satori_python_adapter_onebot11-0.2.0/src/satori/adapters/onebot11/events/__init__.py +0 -1
  9. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/LICENSE +0 -0
  10. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/__init__.py +0 -0
  11. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/api.py +0 -0
  12. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/events/base.py +0 -0
  13. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/events/message.py +0 -0
  14. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/events/notice.py +0 -0
  15. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/events/request.py +0 -0
  16. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/message.py +0 -0
  17. {satori_python_adapter_onebot11-0.2.0 → satori_python_adapter_onebot11-0.2.2}/src/satori/adapters/onebot11/utils.py +0 -0
@@ -1,9 +1,9 @@
1
1
  includes = ["src/satori/adapters/onebot11"]
2
- raw-dependencies = ["satori-python-server >= 0.17.0"]
2
+ raw-dependencies = ["satori-python-server >= 0.17.2"]
3
3
 
4
4
  [project]
5
5
  name = "satori-python-adapter-onebot11"
6
- version = "0.2.0"
6
+ version = "0.2.2"
7
7
  authors = [
8
8
  {name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com"}
9
9
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python-adapter-onebot11
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Satori Protocol SDK for python, adapter for OneBot 11
5
5
  Home-page: https://github.com/RF-Tar-Railt/satori-python
6
6
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
@@ -17,7 +17,7 @@ Classifier: Operating System :: OS Independent
17
17
  Project-URL: Homepage, https://github.com/RF-Tar-Railt/satori-python
18
18
  Project-URL: Repository, https://github.com/RF-Tar-Railt/satori-python
19
19
  Requires-Python: <4.0,>=3.10
20
- Requires-Dist: satori-python-server>=0.17.0
20
+ Requires-Dist: satori-python-server>=0.17.2
21
21
  Description-Content-Type: text/markdown
22
22
 
23
23
  # satori-python
@@ -74,6 +74,7 @@ pip install satori-python-server
74
74
  | Satori | `pip install satori-python-adapter-satori` | satori.adapters.satori |
75
75
  | OneBot V11 | `pip install satori-python-adapter-onebot11` | satori.adapters.onebot11.forward, satori.adapters.onebot11.reverse |
76
76
  | Console | `pip install satori-python-adapter-console` | satori.adapters.console |
77
+ | Milky | `pip install satori-python-adapter-milky` | satori.adapters.milky.main, satori.adapters.milky.webhook |
77
78
 
78
79
  ### 社区适配器
79
80
 
@@ -52,6 +52,7 @@ pip install satori-python-server
52
52
  | Satori | `pip install satori-python-adapter-satori` | satori.adapters.satori |
53
53
  | OneBot V11 | `pip install satori-python-adapter-onebot11` | satori.adapters.onebot11.forward, satori.adapters.onebot11.reverse |
54
54
  | Console | `pip install satori-python-adapter-console` | satori.adapters.console |
55
+ | Milky | `pip install satori-python-adapter-milky` | satori.adapters.milky.main, satori.adapters.milky.webhook |
55
56
 
56
57
  ### 社区适配器
57
58
 
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "satori-python-adapter-onebot11"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  authors = [
5
5
  { name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com" },
6
6
  ]
7
7
  dependencies = [
8
- "satori-python-server >= 0.17.0",
8
+ "satori-python-server >= 0.17.2",
9
9
  ]
10
10
  description = "Satori Protocol SDK for python, adapter for OneBot 11"
11
11
  readme = "README.md"
@@ -62,7 +62,7 @@ excludes = [
62
62
  composite = [
63
63
  "isort ./src/ ./example/",
64
64
  "black ./src/ ./example/",
65
- "ruff check ./src/ ./example/",
65
+ "ruff check",
66
66
  ]
67
67
 
68
68
  [tool.pdm.version]
@@ -86,7 +86,9 @@ extra_standard_library = [
86
86
  line-length = 120
87
87
  target-version = "py310"
88
88
  exclude = [
89
- "exam.py",
89
+ "exam_qps.py",
90
+ "exam1.py",
91
+ "exam2.py",
90
92
  ]
91
93
 
92
94
  [tool.ruff.lint]
@@ -104,7 +106,7 @@ ignore = [
104
106
  "F403",
105
107
  "F405",
106
108
  "C901",
107
- "UP038",
109
+ "T201",
108
110
  ]
109
111
 
110
112
  [tool.pyright]
@@ -0,0 +1,4 @@
1
+ from . import message # noqa: F401
2
+ from . import notice # noqa: F401
3
+ from . import request # noqa: F401
4
+
@@ -213,7 +213,7 @@ class OneBot11ForwardAdapter(BaseAdapter):
213
213
 
214
214
  async def handle_internal(self, request: Request, path: str) -> Response:
215
215
  if path.startswith("_api"):
216
- return JSONResponse(await self.call_api(path[5:], decode(await request.origin.body())))
216
+ return JSONResponse(await self.call_api(path[5:], await request.origin.json()))
217
217
  async with self.session.get(path) as resp:
218
218
  return Response(await resp.read())
219
219
 
@@ -31,7 +31,7 @@ class _Connection:
31
31
  self.response_waiters: dict[str, asyncio.Future] = {}
32
32
 
33
33
  async def message_receive(self):
34
- async for msg in self.ws.iter_bytes():
34
+ async for msg in self.ws.iter_text():
35
35
  yield self, decode(msg)
36
36
  else:
37
37
  self.close_signal.set()
@@ -203,7 +203,7 @@ class OneBot11ReverseAdapter(BaseAdapter):
203
203
  async def handle_internal(self, request: Request, path: str) -> Response:
204
204
  if path.startswith("_api"):
205
205
  self_id = request.self_id
206
- return JSONResponse(await self.connections[self_id].call_api(path[5:], decode(await request.origin.body())))
206
+ return JSONResponse(await self.connections[self_id].call_api(path[5:], await request.origin.json()))
207
207
  async with self.server.session.get(path) as resp:
208
208
  return Response(await resp.read())
209
209
 
@@ -1 +0,0 @@
1
- from . import message # noqa: F401