satori-python 1.3.7__py3-none-any.whl → 1.3.8__py3-none-any.whl
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.
- satori/__init__.py +1 -1
- satori/element.py +9 -0
- satori/model.py +3 -3
- {satori_python-1.3.7.dist-info → satori_python-1.3.8.dist-info}/METADATA +1 -1
- {satori_python-1.3.7.dist-info → satori_python-1.3.8.dist-info}/RECORD +7 -7
- {satori_python-1.3.7.dist-info → satori_python-1.3.8.dist-info}/WHEEL +0 -0
- {satori_python-1.3.7.dist-info → satori_python-1.3.8.dist-info}/licenses/LICENSE +0 -0
satori/__init__.py
CHANGED
satori/element.py
CHANGED
|
@@ -469,6 +469,15 @@ class Paragraph(Style):
|
|
|
469
469
|
return "p"
|
|
470
470
|
|
|
471
471
|
|
|
472
|
+
class Blockquote(Style):
|
|
473
|
+
"""<blockquote> 元素表示块引用"""
|
|
474
|
+
|
|
475
|
+
@property
|
|
476
|
+
@override
|
|
477
|
+
def tag(self) -> str:
|
|
478
|
+
return "blockquote"
|
|
479
|
+
|
|
480
|
+
|
|
472
481
|
@dataclass(init=False, repr=False)
|
|
473
482
|
class Message(Element):
|
|
474
483
|
"""<message> 元素的基本用法是表示一条消息。
|
satori/model.py
CHANGED
|
@@ -34,7 +34,7 @@ class ModelBase:
|
|
|
34
34
|
data = {}
|
|
35
35
|
cls.before_parse(data)
|
|
36
36
|
for name in cls.__dataclass_fields__:
|
|
37
|
-
if name in raw:
|
|
37
|
+
if name in raw and raw[name] is not None:
|
|
38
38
|
if name in cls.__converter__:
|
|
39
39
|
data[name] = cls.__converter__[name](raw[name])
|
|
40
40
|
else:
|
|
@@ -55,7 +55,7 @@ class ModelBase:
|
|
|
55
55
|
keys = frozenset(k for k in keys if not k.startswith("_"))
|
|
56
56
|
|
|
57
57
|
def parse1(cls_: type[Self], raw: dict, _keys=keys) -> Self:
|
|
58
|
-
data = {k: v for k, v in raw.items() if k in _keys}
|
|
58
|
+
data = {k: v for k, v in raw.items() if k in _keys and v is not None}
|
|
59
59
|
obj = cls_(**data) # type: ignore
|
|
60
60
|
obj._raw_data = raw
|
|
61
61
|
return obj
|
|
@@ -64,7 +64,7 @@ class ModelBase:
|
|
|
64
64
|
data = {}
|
|
65
65
|
cls_.before_parse(data)
|
|
66
66
|
for name in _keys:
|
|
67
|
-
if name in raw:
|
|
67
|
+
if name in raw and raw[name] is not None:
|
|
68
68
|
if name in cls_.__converter__:
|
|
69
69
|
data[name] = cls_.__converter__[name](raw[name])
|
|
70
70
|
else:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
satori/__init__.py,sha256=
|
|
1
|
+
satori/__init__.py,sha256=gzKo9sSVvK-ievs6_yV1j96p_m3UTojchviX4kdw1Z8,1888
|
|
2
2
|
satori/_vendor/fleep.py,sha256=_zKP7iY3mMQr0rC5KbgkbkMorT3KVLeIsWPLIUa0Y34,16347
|
|
3
3
|
satori/client/__init__.py,sha256=KZB5Ta5KzxdfCO8Ey5AuG7l4dzI0KnkqlaBVuyrfEMA,14481
|
|
4
4
|
satori/client/account.py,sha256=HP7BJWkN69SB9ldNIjHxWlXcrmB-IPnTnYqm3lBMvl8,2742
|
|
@@ -11,10 +11,10 @@ satori/client/network/webhook.py,sha256=N1zcJGx-Ijwtc0dIsPWzdnJSLi0ydQTengHBxtbb
|
|
|
11
11
|
satori/client/network/websocket.py,sha256=oZtiFLywP_Rw-_I-hl32nShCTTQ1XKlv0BhWJj53x9Y,8476
|
|
12
12
|
satori/client/protocol.py,sha256=hXrtgh-ypiF1W-dTl5I4LBWg8P2VTNKYQWFq8aRCeeo,28577
|
|
13
13
|
satori/const.py,sha256=6TQAIlgNq7fHLiadxGUU-mzkffOcpRrEvq5yrWYMuGc,2738
|
|
14
|
-
satori/element.py,sha256=
|
|
14
|
+
satori/element.py,sha256=JjF_flhH1GpJlSLEA1mHUvxLugn47L5KlHK8kt5Sp4k,21510
|
|
15
15
|
satori/event.py,sha256=yC6rKaa7JbeOZ4Un1rX-Isvm3EcR7e782nxYf1j6JdM,1060
|
|
16
16
|
satori/exception.py,sha256=edKeuLRZAQxyCdw1_XCgOtv5tIHkfHw0Die9B818_HM,545
|
|
17
|
-
satori/model.py,sha256=
|
|
17
|
+
satori/model.py,sha256=tY47aOsb6HrpPAvGA6IHLNthVCwoUB8c2w1XeDFFmvQ,17684
|
|
18
18
|
satori/parser.py,sha256=EyKitj39OewGhZuNIvrd8nWJiL5EJAVy7mtcv8Zk6v0,14658
|
|
19
19
|
satori/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
satori/server/__init__.py,sha256=SumWaENrpRiZL7hLZpk8zcOJ-wvphHPMJjKwyhVzhDQ,24338
|
|
@@ -25,7 +25,7 @@ satori/server/model.py,sha256=zzjNa3iBFkd8crZIVTrEisPaB0g8JsxV4fA2rRU0maw,1105
|
|
|
25
25
|
satori/server/route.py,sha256=kpelAX0kYQbJncp5biWi8pWRcEIez9m9sJN8NF3sjn4,10654
|
|
26
26
|
satori/server/utils.py,sha256=hMNqLzbzcwyLJO-sGncO5kuviiW5Y6k34fj4AS2iVWQ,910
|
|
27
27
|
satori/utils.py,sha256=N8HEw-DOXxOBwFHmmXgqPdMh6AXjiGR0ZGa1zBPH6EI,822
|
|
28
|
-
satori_python-1.3.
|
|
29
|
-
satori_python-1.3.
|
|
30
|
-
satori_python-1.3.
|
|
31
|
-
satori_python-1.3.
|
|
28
|
+
satori_python-1.3.8.dist-info/METADATA,sha256=GaRExW9GyUj81eVGnfFxhaugCbH_LB-U4TsuByfUc-M,5511
|
|
29
|
+
satori_python-1.3.8.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
|
30
|
+
satori_python-1.3.8.dist-info/licenses/LICENSE,sha256=2EDswKd1M1648judap8BEEwp3Jz6IpfFP2wYVdU0Y2o,1069
|
|
31
|
+
satori_python-1.3.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|