satori-python-adapter-onebot11 0.4.1__tar.gz → 0.4.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.
Files changed (16) hide show
  1. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/.mina/adapter_onebot11.toml +4 -4
  2. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/PKG-INFO +6 -6
  3. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/README.md +2 -2
  4. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/pyproject.toml +15 -17
  5. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/forward.py +6 -6
  6. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/message.py +1 -1
  7. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/reverse.py +6 -6
  8. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/utils.py +3 -3
  9. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/LICENSE +0 -0
  10. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/__init__.py +0 -0
  11. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/api.py +0 -0
  12. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/events/__init__.py +0 -0
  13. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/events/base.py +0 -0
  14. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/events/message.py +0 -0
  15. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/events/notice.py +0 -0
  16. {satori_python_adapter_onebot11-0.4.1 → satori_python_adapter_onebot11-0.4.4}/src/satori/adapters/onebot11/events/request.py +0 -0
@@ -1,9 +1,9 @@
1
1
  includes = ["src/satori/adapters/onebot11"]
2
- raw-dependencies = ["satori-python-server<1.4.0,>= 1.3.0"]
2
+ raw-dependencies = ["satori-python-server<1.4.0,>= 1.3.3"]
3
3
 
4
4
  [project]
5
5
  name = "satori-python-adapter-onebot11"
6
- version = "0.4.1"
6
+ version = "0.4.4"
7
7
  authors = [
8
8
  {name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com"}
9
9
  ]
@@ -16,11 +16,11 @@ classifiers = [
16
16
  "Typing :: Typed",
17
17
  "Development Status :: 4 - Beta",
18
18
  "License :: OSI Approved :: MIT License",
19
- "Programming Language :: Python :: 3.8",
20
- "Programming Language :: Python :: 3.9",
21
19
  "Programming Language :: Python :: 3.10",
22
20
  "Programming Language :: Python :: 3.11",
23
21
  "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
24
24
  "Operating System :: OS Independent",
25
25
  ]
26
26
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python-adapter-onebot11
3
- Version: 0.4.1
3
+ Version: 0.4.4
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>
@@ -8,16 +8,16 @@ License: MIT
8
8
  Classifier: Typing :: Typed
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3.8
12
- Classifier: Programming Language :: Python :: 3.9
13
11
  Classifier: Programming Language :: Python :: 3.10
14
12
  Classifier: Programming Language :: Python :: 3.11
15
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
16
  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<1.4.0,>=1.3.0
20
+ Requires-Dist: satori-python-server<1.4.0,>=1.3.3
21
21
  Description-Content-Type: text/markdown
22
22
 
23
23
  # satori-python
@@ -27,11 +27,11 @@ Description-Content-Type: text/markdown
27
27
  [![PyPI](https://img.shields.io/pypi/v/satori-python)](https://pypi.org/project/satori-python)
28
28
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/satori-python)](https://www.python.org/)
29
29
 
30
- 基于 [Satori](https://satori.chat/zh-CN/) 协议的 Python 开发工具包
30
+ 基于 [Satori](https://satori.chat/zh-CN/protocol) 协议的 Python 开发工具包
31
31
 
32
32
  ## 协议介绍
33
33
 
34
- [Satori Protocol](https://satori.chat/zh-CN/)
34
+ [Satori Protocol](https://satori.chat/zh-CN/protocol)
35
35
 
36
36
  ### 协议端
37
37
 
@@ -5,11 +5,11 @@
5
5
  [![PyPI](https://img.shields.io/pypi/v/satori-python)](https://pypi.org/project/satori-python)
6
6
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/satori-python)](https://www.python.org/)
7
7
 
8
- 基于 [Satori](https://satori.chat/zh-CN/) 协议的 Python 开发工具包
8
+ 基于 [Satori](https://satori.chat/zh-CN/protocol) 协议的 Python 开发工具包
9
9
 
10
10
  ## 协议介绍
11
11
 
12
- [Satori Protocol](https://satori.chat/zh-CN/)
12
+ [Satori Protocol](https://satori.chat/zh-CN/protocol)
13
13
 
14
14
  ### 协议端
15
15
 
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "satori-python-adapter-onebot11"
3
- version = "0.4.1"
3
+ version = "0.4.4"
4
4
  authors = [
5
5
  { name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com" },
6
6
  ]
7
7
  dependencies = [
8
- "satori-python-server<1.4.0,>= 1.3.0",
8
+ "satori-python-server<1.4.0,>= 1.3.3",
9
9
  ]
10
10
  description = "Satori Protocol SDK for python, adapter for OneBot 11"
11
11
  readme = "README.md"
@@ -14,11 +14,11 @@ classifiers = [
14
14
  "Typing :: Typed",
15
15
  "Development Status :: 4 - Beta",
16
16
  "License :: OSI Approved :: MIT License",
17
- "Programming Language :: Python :: 3.8",
18
- "Programming Language :: Python :: 3.9",
19
17
  "Programming Language :: Python :: 3.10",
20
18
  "Programming Language :: Python :: 3.11",
21
19
  "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
22
22
  "Operating System :: OS Independent",
23
23
  ]
24
24
 
@@ -38,15 +38,14 @@ build-backend = "mina.backend"
38
38
 
39
39
  [dependency-groups]
40
40
  dev = [
41
- "isort>=5.13.2",
42
- "black>=24.4.0",
43
- "ruff>=0.4.1",
41
+ "black>=26.3.0",
42
+ "ruff>=0.15.1",
44
43
  "pre-commit>=3.7.0",
45
- "fix-future-annotations>=0.5.0",
46
44
  "mina-build<0.6,>=0.5.1",
47
45
  "pdm-mina>=0.3.2",
48
46
  "nonechat<0.7.0,>=0.6.0",
49
47
  "uvicorn[standard]>=0.37.0",
48
+ "pydantic>=2.13.1",
50
49
  ]
51
50
 
52
51
  [tool.pdm.build]
@@ -60,7 +59,7 @@ excludes = [
60
59
 
61
60
  [tool.pdm.scripts.format]
62
61
  composite = [
63
- "isort ./src/ ./example/",
62
+ "ruff check --select I --fix ./src/ ./example/",
64
63
  "black ./src/ ./example/",
65
64
  "ruff check",
66
65
  ]
@@ -74,14 +73,6 @@ line-length = 120
74
73
  include = "\\.pyi?$"
75
74
  extend-exclude = ""
76
75
 
77
- [tool.isort]
78
- profile = "black"
79
- line_length = 120
80
- skip_gitignore = true
81
- extra_standard_library = [
82
- "typing_extensions",
83
- ]
84
-
85
76
  [tool.ruff]
86
77
  line-length = 120
87
78
  target-version = "py310"
@@ -91,6 +82,7 @@ exclude = [
91
82
  "exam2.py",
92
83
  "src/satori/_vendor/*",
93
84
  ]
85
+ respect-gitignore = true
94
86
 
95
87
  [tool.ruff.lint]
96
88
  select = [
@@ -110,6 +102,12 @@ ignore = [
110
102
  "T201",
111
103
  ]
112
104
 
105
+ [tool.ruff.lint.isort]
106
+ extra-standard-library = [
107
+ "typing_extensions",
108
+ ]
109
+ force-sort-within-sections = false
110
+
113
111
  [tool.pyright]
114
112
  pythonPlatform = "All"
115
113
  pythonVersion = "3.10"
@@ -77,9 +77,9 @@ class OneBot11ForwardAdapter(BaseAdapter):
77
77
  if self_id not in self.logins:
78
78
  self_info = await self.call_api("get_login_info")
79
79
  login = Login(
80
- 0,
81
- LoginStatus.ONLINE,
82
- "onebot",
80
+ sn=0,
81
+ status=LoginStatus.ONLINE,
82
+ adapter="onebot",
83
83
  platform="onebot",
84
84
  user=User(
85
85
  self_id,
@@ -101,9 +101,9 @@ class OneBot11ForwardAdapter(BaseAdapter):
101
101
  if self_id not in self.logins:
102
102
  self_info = await self.call_api("get_login_info")
103
103
  login = Login(
104
- 0,
105
- LoginStatus.ONLINE,
106
- "onebot",
104
+ sn=0,
105
+ status=LoginStatus.ONLINE,
106
+ adapter="onebot",
107
107
  platform="onebot",
108
108
  user=User(
109
109
  self_id,
@@ -159,7 +159,7 @@ class OneBot11MessageEncoder:
159
159
  },
160
160
  )
161
161
  if resp:
162
- self.results.append(MessageObject(resp["message_id"], ""))
162
+ self.results.append(MessageObject(str(resp["message_id"]), ""))
163
163
  self.children = []
164
164
 
165
165
  async def _send_file(self, attrs: dict[str, Any]):
@@ -57,9 +57,9 @@ class _Connection:
57
57
  if self_id not in self.adapter.logins:
58
58
  self_info = await self.call_api("get_login_info")
59
59
  login = Login(
60
- 0,
61
- LoginStatus.ONLINE,
62
- "onebot",
60
+ sn=0,
61
+ status=LoginStatus.ONLINE,
62
+ adapter="onebot",
63
63
  platform="onebot",
64
64
  user=User(
65
65
  self_id,
@@ -81,9 +81,9 @@ class _Connection:
81
81
  if self_id not in self.adapter.logins:
82
82
  self_info = await self.call_api("get_login_info")
83
83
  login = Login(
84
- 0,
85
- LoginStatus.ONLINE,
86
- "onebot",
84
+ sn=0,
85
+ status=LoginStatus.ONLINE,
86
+ adapter="onebot",
87
87
  platform="onebot",
88
88
  user=User(
89
89
  self_id,
@@ -22,7 +22,7 @@ USER_AVATAR_URL = "https://q2.qlogo.cn/headimg_dl?dst_uin={uin}&spec=640"
22
22
  GROUP_AVATAR_URL = "https://p.qlogo.cn/gh/{group}/{group}/"
23
23
 
24
24
  ROLE_MAPPING = {
25
- "member": Role("MEMBER", "群成员"),
26
- "admin": Role("ADMINISTRATOR", "管理员"),
27
- "owner": Role("OWNER", "群主"),
25
+ "member": Role("member", "群成员"),
26
+ "admin": Role("admin", "管理员"),
27
+ "owner": Role("owner", "群主"),
28
28
  }