hyper-bot 0.74__tar.gz → 0.741__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.
@@ -21,7 +21,10 @@ def segment_builder(sg_type: str, summary_tmp: str = None):
21
21
 
22
22
  if len(kwargs) > 0:
23
23
  for i in kwargs:
24
- arg[i] = kwargs[i]
24
+ try:
25
+ arg[i] = anns[i](kwargs[i])
26
+ except TypeError:
27
+ arg[i] = kwargs[i]
25
28
  new_arg = arg.copy()
26
29
 
27
30
  if len(anns) > len(arg):
@@ -30,7 +33,10 @@ def segment_builder(sg_type: str, summary_tmp: str = None):
30
33
  if i not in var.keys():
31
34
  new_arg[i] = None
32
35
  continue
33
- new_arg[i] = anns[i](var[i])
36
+ try:
37
+ new_arg[i] = anns[i](var[i])
38
+ except TypeError:
39
+ new_arg[i] = var[i]
34
40
 
35
41
  for i in new_arg:
36
42
  setattr(self, i, new_arg[i])
@@ -40,7 +46,7 @@ def segment_builder(sg_type: str, summary_tmp: str = None):
40
46
  def to_json(self) -> dict:
41
47
  base = {"type": sg_type, "data": {}}
42
48
  for i in anns:
43
- base["data"][i] = anns[i](getattr(self, i))
49
+ base["data"][i] = getattr(self, i)
44
50
  return base
45
51
 
46
52
  cls.to_json = to_json
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyper-bot
3
- Version: 0.74
3
+ Version: 0.741
4
4
  Summary: 稳定高效、易于开发的QQ Bot框架
5
5
  Home-page: https://github.com/HarcicYang/HypeR_Bot
6
6
  Author: Harcic
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hyper-bot
3
- Version: 0.74
3
+ Version: 0.741
4
4
  Summary: 稳定高效、易于开发的QQ Bot框架
5
5
  Home-page: https://github.com/HarcicYang/HypeR_Bot
6
6
  Author: Harcic
@@ -4,7 +4,7 @@ from setuptools import setup
4
4
 
5
5
  setup(
6
6
  name="hyper-bot",
7
- version="0.74",
7
+ version="0.741",
8
8
  description="稳定高效、易于开发的QQ Bot框架",
9
9
  author="Harcic",
10
10
  author_email="harcic@outlook.com",
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