hyper-bot 1.0.0.post3__tar.gz → 1.0.1__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 (49) hide show
  1. {hyper_bot-1.0.0.post3/src/hyper_bot.egg-info → hyper_bot-1.0.1}/PKG-INFO +1 -1
  2. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/pyproject.toml +1 -1
  3. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1/src/hyper_bot.egg-info}/PKG-INFO +1 -1
  4. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/milky/translator.py +3 -3
  5. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/protocol/builder.py +1 -1
  6. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/protocol/listener.py +2 -2
  7. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/segments.py +2 -2
  8. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_milky.py +2 -2
  9. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/LICENSE +0 -0
  10. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/setup.cfg +0 -0
  11. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyper_bot.egg-info/SOURCES.txt +0 -0
  12. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyper_bot.egg-info/dependency_links.txt +0 -0
  13. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyper_bot.egg-info/requires.txt +0 -0
  14. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyper_bot.egg-info/top_level.txt +0 -0
  15. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/__init__.py +0 -0
  16. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/__init__.py +0 -0
  17. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/milky/__init__.py +0 -0
  18. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/milky/actions.py +0 -0
  19. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/milky/listener.py +0 -0
  20. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/milky/packet.py +0 -0
  21. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/onebot/__init__.py +0 -0
  22. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/onebot/actions.py +0 -0
  23. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/onebot/listener.py +0 -0
  24. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/adapters/onebot/packet.py +0 -0
  25. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/common.py +0 -0
  26. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/configurator.py +0 -0
  27. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/events.py +0 -0
  28. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/hyperogger.py +0 -0
  29. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/listener.py +0 -0
  30. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/network.py +0 -0
  31. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/protocol/__init__.py +0 -0
  32. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/protocol/actions.py +0 -0
  33. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/protocol/segments.py +0 -0
  34. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/__init__.py +0 -0
  35. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/apiresponse.py +0 -0
  36. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/ark_sign_helper.py +0 -0
  37. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/errors.py +0 -0
  38. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/hypetyping.py +0 -0
  39. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/screens.py +0 -0
  40. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/src/hyperot/utils/typextensions.py +0 -0
  41. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_configurator.py +0 -0
  42. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_events.py +0 -0
  43. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_listener.py +0 -0
  44. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_network.py +0 -0
  45. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_onebot.py +0 -0
  46. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_registry.py +0 -0
  47. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_segments.py +0 -0
  48. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_utils.py +0 -0
  49. {hyper_bot-1.0.0.post3 → hyper_bot-1.0.1}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper-bot
3
- Version: 1.0.0.post3
3
+ Version: 1.0.1
4
4
  Summary: 稳定高效、易于开发的QQ Bot框架
5
5
  Author-email: Harcic <harcic@outlook.com>
6
6
  Project-URL: repository, https://github.com/HarcicYang/HypeR_Bot
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "hyper-bot"
7
- version = "1.0.0.post3"
7
+ version = "1.0.1"
8
8
  description = "稳定高效、易于开发的QQ Bot框架"
9
9
  authors = [
10
10
  { name = "Harcic", email = "harcic@outlook.com" },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyper-bot
3
- Version: 1.0.0.post3
3
+ Version: 1.0.1
4
4
  Summary: 稳定高效、易于开发的QQ Bot框架
5
5
  Author-email: Harcic <harcic@outlook.com>
6
6
  Project-URL: repository, https://github.com/HarcicYang/HypeR_Bot
@@ -41,7 +41,7 @@ class MilkyOutGoingSegBuilder:
41
41
  self.segments.append({"type": "reply", "data": {"message_seq": seq}})
42
42
  return self
43
43
 
44
- def image(self, uri: str, summary: str = "[Image]", sub_type: str = "normal") -> "MilkyOutGoingSegBuilder":
44
+ def image(self, uri: str, summary: str = "[图片]", sub_type: str = "normal") -> "MilkyOutGoingSegBuilder":
45
45
  self.segments.append({"type": "image", "data": {"uri": uri, "summary": summary, "sub_type": sub_type}})
46
46
  return self
47
47
 
@@ -86,7 +86,7 @@ def message_translator(milky_message: list[dict], peer_id: int, scene: int = 0)
86
86
  case "text":
87
87
  builder.text(seg_data["text"])
88
88
  case "image":
89
- builder.image(file=seg_data["temp_url"], summary=seg_data.get("summary", "[Image]"))
89
+ builder.image(file=seg_data["temp_url"], summary=seg_data.get("summary", "[图片]"))
90
90
  case "mention":
91
91
  builder.at(seg_data["user_id"])
92
92
  case "mention_all":
@@ -177,7 +177,7 @@ def _to_milky_seg(seg: dict) -> dict:
177
177
  "type": "image",
178
178
  "data": {
179
179
  "uri": seg_data.get("file"),
180
- "summary": seg_data.get("summary", "[Image]"),
180
+ "summary": seg_data.get("summary", "[图片]"),
181
181
  "sub_type": seg_data.get("sub_type", "normal"),
182
182
  },
183
183
  }
@@ -191,7 +191,7 @@ class OneBotJsonMessageBuilder:
191
191
  self.message.append({"type": "text", "data": {"text": text}})
192
192
  return self
193
193
 
194
- def image(self, file: str, summary: str = "[Image]") -> "OneBotJsonMessageBuilder":
194
+ def image(self, file: str, summary: str = "[图片]") -> "OneBotJsonMessageBuilder":
195
195
  self.message.append({"type": "image", "data": {"file": file, "url": file, "summary": summary}})
196
196
  return self
197
197
 
@@ -5,7 +5,7 @@ import time
5
5
  from collections.abc import Callable
6
6
  from typing import Any
7
7
 
8
- from websockets.exceptions import ConnectionClosedError
8
+ from websockets.exceptions import ConnectionClosed
9
9
 
10
10
  from .. import configurator, hyperogger
11
11
  from ..events import HyperListenerStartNotify, HyperListenerStopNotify, HyperNotify
@@ -90,7 +90,7 @@ class BaseListener:
90
90
  while True:
91
91
  try:
92
92
  data = await connection.recv()
93
- except (ConnectionClosedError, ConnectionResetError):
93
+ except (ConnectionClosed, ConnectionResetError):
94
94
  logger.error("连接断开")
95
95
  break
96
96
  except json.decoder.JSONDecodeError:
@@ -81,9 +81,9 @@ class StreamTest(SegmentBase, st="stream", su="[Stream] <text>"):
81
81
 
82
82
 
83
83
  @dataclasses.dataclass
84
- class Image(MediaSeg, st="image", su="[Image]"):
84
+ class Image(MediaSeg, st="image", su="[图片]"):
85
85
  file: str
86
- summary: str = "[Image]"
86
+ summary: str = "[图片]"
87
87
  url: str | None = None
88
88
 
89
89
 
@@ -39,7 +39,7 @@ def test_message_translator_basic():
39
39
  )
40
40
  assert ob == [
41
41
  {"type": "text", "data": {"text": "hi"}},
42
- {"type": "image", "data": {"file": "http://a/b.png", "url": "http://a/b.png", "summary": "[Image]"}},
42
+ {"type": "image", "data": {"file": "http://a/b.png", "url": "http://a/b.png", "summary": "[图片]"}},
43
43
  {"type": "at", "data": {"qq": 123}},
44
44
  {"type": "at", "data": {"qq": "all"}},
45
45
  ]
@@ -494,7 +494,7 @@ def test_milky_outgoing_seg_at():
494
494
  def test_milky_outgoing_seg_image():
495
495
  assert Image(file="http://a/b.png").milky_outgoing_seg() == {
496
496
  "type": "image",
497
- "data": {"uri": "http://a/b.png", "summary": "[Image]", "sub_type": "normal"},
497
+ "data": {"uri": "http://a/b.png", "summary": "[图片]", "sub_type": "normal"},
498
498
  }
499
499
 
500
500
 
File without changes
File without changes