satori-python 1.3.7__tar.gz → 1.3.8__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 (31) hide show
  1. {satori_python-1.3.7 → satori_python-1.3.8}/PKG-INFO +1 -1
  2. {satori_python-1.3.7 → satori_python-1.3.8}/pyproject.toml +1 -1
  3. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/__init__.py +1 -1
  4. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/element.py +9 -0
  5. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/model.py +3 -3
  6. {satori_python-1.3.7 → satori_python-1.3.8}/LICENSE +0 -0
  7. {satori_python-1.3.7 → satori_python-1.3.8}/README.md +0 -0
  8. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/_vendor/fleep.py +0 -0
  9. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/__init__.py +0 -0
  10. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/account.py +0 -0
  11. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/account.pyi +0 -0
  12. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/config.py +0 -0
  13. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/network/__init__.py +0 -0
  14. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/network/base.py +0 -0
  15. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/network/util.py +0 -0
  16. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/network/webhook.py +0 -0
  17. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/network/websocket.py +0 -0
  18. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/client/protocol.py +0 -0
  19. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/const.py +0 -0
  20. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/event.py +0 -0
  21. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/exception.py +0 -0
  22. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/parser.py +0 -0
  23. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/py.typed +0 -0
  24. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/__init__.py +0 -0
  25. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/adapter.py +0 -0
  26. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/connection.py +0 -0
  27. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/formdata.py +0 -0
  28. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/model.py +0 -0
  29. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/route.py +0 -0
  30. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/server/utils.py +0 -0
  31. {satori_python-1.3.7 → satori_python-1.3.8}/src/satori/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: satori-python
3
- Version: 1.3.7
3
+ Version: 1.3.8
4
4
  Summary: Satori Protocol SDK for python
5
5
  Home-page: https://github.com/RF-Tar-Railt/satori-python
6
6
  Author-Email: RF-Tar-Railt <rf_tar_railt@qq.com>
@@ -30,7 +30,7 @@ classifiers = [
30
30
  "Programming Language :: Python :: 3.14",
31
31
  "Operating System :: OS Independent",
32
32
  ]
33
- version = "1.3.7"
33
+ version = "1.3.8"
34
34
 
35
35
  [project.license]
36
36
  text = "MIT"
@@ -45,7 +45,7 @@ from .model import Role as Role
45
45
  from .model import Upload as Upload
46
46
  from .model import User as User
47
47
 
48
- __version__ = "1.3.7"
48
+ __version__ = "1.3.8"
49
49
 
50
50
 
51
51
  MessageReceipt = MessageObject
@@ -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> 元素的基本用法是表示一条消息。
@@ -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:
File without changes
File without changes