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.
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Segments.py +9 -3
- {hyper-bot-0.74 → hyper-bot-0.741}/PKG-INFO +1 -1
- {hyper-bot-0.74 → hyper-bot-0.741}/hyper_bot.egg-info/PKG-INFO +1 -1
- {hyper-bot-0.74 → hyper-bot-0.741}/setup.py +1 -1
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Adapters/OneBot.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Adapters/OneBotLib/Manager.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Configurator.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/DataBase.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Errors.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Events.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Listener.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Logger.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Logic.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Manager.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/ModuleClass.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/Network.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/Hyper/WordSafety.py +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/LICENSE +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/hyper_bot.egg-info/SOURCES.txt +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/hyper_bot.egg-info/dependency_links.txt +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/hyper_bot.egg-info/top_level.txt +0 -0
- {hyper-bot-0.74 → hyper-bot-0.741}/setup.cfg +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
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] =
|
|
49
|
+
base["data"][i] = getattr(self, i)
|
|
44
50
|
return base
|
|
45
51
|
|
|
46
52
|
cls.to_json = to_json
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|