satori-python-core 1.3.3__tar.gz → 1.3.4__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.
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/PKG-INFO +1 -1
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/pyproject.toml +1 -1
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/__init__.py +1 -1
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/model.py +8 -1
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/.mina/core.toml +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/LICENSE +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/README.md +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/_vendor/fleep.py +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/const.py +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/element.py +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/event.py +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/exception.py +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/parser.py +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/py.typed +0 -0
- {satori_python_core-1.3.3 → satori_python_core-1.3.4}/src/satori/utils.py +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import mimetypes
|
|
2
|
+
import sys
|
|
3
|
+
import typing
|
|
2
4
|
from collections.abc import AsyncIterable, Awaitable, Callable
|
|
3
5
|
from dataclasses import dataclass, field
|
|
4
6
|
from datetime import datetime
|
|
@@ -12,6 +14,11 @@ from .element import Element, Emoji, transform
|
|
|
12
14
|
from .parser import Element as RawElement
|
|
13
15
|
from .parser import parse
|
|
14
16
|
|
|
17
|
+
if sys.version_info >= (3, 12):
|
|
18
|
+
_generic_init_subclass = typing._generic_init_subclass
|
|
19
|
+
else:
|
|
20
|
+
_generic_init_subclass = Generic.__init_subclass__.__func__
|
|
21
|
+
|
|
15
22
|
|
|
16
23
|
@dataclass(slots=True)
|
|
17
24
|
class ModelBase:
|
|
@@ -41,7 +48,7 @@ class ModelBase:
|
|
|
41
48
|
keys = set()
|
|
42
49
|
for c in cls.__mro__:
|
|
43
50
|
if c is Generic:
|
|
44
|
-
|
|
51
|
+
_generic_init_subclass(cls, **kwargs)
|
|
45
52
|
if getattr(c, "__converter__", None):
|
|
46
53
|
has_converter = True
|
|
47
54
|
keys.update(getattr(c, "__annotations__", {}).keys())
|
|
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
|