nova-mvvm 0.13.0__py3-none-any.whl → 0.13.2__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.
- nova/mvvm/panel_binding/binding.py +2 -1
- nova/mvvm/trame_binding/binding.py +5 -0
- {nova_mvvm-0.13.0.dist-info → nova_mvvm-0.13.2.dist-info}/METADATA +1 -1
- {nova_mvvm-0.13.0.dist-info → nova_mvvm-0.13.2.dist-info}/RECORD +6 -6
- {nova_mvvm-0.13.0.dist-info → nova_mvvm-0.13.2.dist-info}/WHEEL +0 -0
- {nova_mvvm-0.13.0.dist-info → nova_mvvm-0.13.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"""Binding module for the Panel framework."""
|
|
2
2
|
|
|
3
3
|
import inspect
|
|
4
|
-
from typing import Any, Callable, List, Optional, Union, cast
|
|
4
|
+
from typing import Any, Callable, List, Optional, Union, cast
|
|
5
5
|
|
|
6
6
|
import param
|
|
7
7
|
from pydantic import BaseModel, ValidationError
|
|
8
|
+
from typing_extensions import override
|
|
8
9
|
|
|
9
10
|
from .. import bindings_map
|
|
10
11
|
from .._internal.pydantic_utils import get_errored_fields_from_validation_error, get_updated_fields
|
|
@@ -142,6 +142,7 @@ class StateConnection:
|
|
|
142
142
|
"""Connection that uses a state variable."""
|
|
143
143
|
|
|
144
144
|
def __init__(self, communicator: TrameCommunicator, state_variable_name: Optional[str]) -> None:
|
|
145
|
+
self.has_errors = False
|
|
145
146
|
self.state_variable_name = state_variable_name
|
|
146
147
|
self.communicator = communicator
|
|
147
148
|
self.state = communicator.state
|
|
@@ -226,6 +227,7 @@ class StateConnection:
|
|
|
226
227
|
errors = get_errored_fields_from_validation_error(e)
|
|
227
228
|
error = e
|
|
228
229
|
updated = True
|
|
230
|
+
self.has_errors = True
|
|
229
231
|
elif isinstance(self.viewmodel_linked_object, dict):
|
|
230
232
|
self.viewmodel_linked_object.update(kwargs[state_variable_name])
|
|
231
233
|
updates.append(state_variable_name)
|
|
@@ -234,6 +236,9 @@ class StateConnection:
|
|
|
234
236
|
updates.append(state_variable_name)
|
|
235
237
|
else:
|
|
236
238
|
raise Exception("cannot update", self.viewmodel_linked_object)
|
|
239
|
+
if self.has_errors and not errors:
|
|
240
|
+
updated = True
|
|
241
|
+
self.has_errors = False
|
|
237
242
|
if updated:
|
|
238
243
|
await self._handle_callback({"updated": updates, "errored": errors, "error": error})
|
|
239
244
|
|
|
@@ -7,7 +7,7 @@ nova/mvvm/_internal/pydantic_utils.py,sha256=kHZLR5Noc581kz-OYRO6EW-jyjB443BF_wV
|
|
|
7
7
|
nova/mvvm/_internal/pyqt_communicator.py,sha256=kcEaXCjJZXymNBM-8x5Yk22SUQFrQ7c5yV1-GDYf3DM,3797
|
|
8
8
|
nova/mvvm/_internal/utils.py,sha256=2YDUvAmJjjb89ROE4n4GWD4Qqz-rRqVP4ICDGnIcFNc,3303
|
|
9
9
|
nova/mvvm/panel_binding/__init__.py,sha256=HHDlUyP-LuRePcHS1s8tq3niuG3f3n8gdSRb7Rwtc4o,100
|
|
10
|
-
nova/mvvm/panel_binding/binding.py,sha256=
|
|
10
|
+
nova/mvvm/panel_binding/binding.py,sha256=Fz_t2XHoU8hfbf-nDDypk4V_KHH7T7OqYFCl65k4XEE,6352
|
|
11
11
|
nova/mvvm/pyqt5_binding/__init__.py,sha256=JbKOFJNIObJReotRHlN5-vi7oSMyc_v8K_uHjeJLcHg,62
|
|
12
12
|
nova/mvvm/pyqt5_binding/binding.py,sha256=Nki03KgafysfJFQ86evYvL8lprbrYNajFNgfihk7KA4,1462
|
|
13
13
|
nova/mvvm/pyqt5_binding/pyqt5_worker.py,sha256=bf0Yj2cnX3xljFHQmWy6B9bCildhNSVEDXSqahprCXU,2133
|
|
@@ -15,9 +15,9 @@ nova/mvvm/pyqt6_binding/__init__.py,sha256=plms0W4kJjFpZReGOC7lE3SYX1ceGTLbdAJ1G
|
|
|
15
15
|
nova/mvvm/pyqt6_binding/binding.py,sha256=uZNHx23Pf9DwGf3qKfQdmjOhmaXcppNd8pjkh363WP4,1365
|
|
16
16
|
nova/mvvm/pyqt6_binding/pyqt6_worker.py,sha256=y8g_mfPC1xIcpyKq7ZZqxrn9Txp5gPJrsBjAwS5FHhY,2133
|
|
17
17
|
nova/mvvm/trame_binding/__init__.py,sha256=uTdEW9VxtVubSbTLpoD3pC8a-KMgbKkZFlRbucvuQSE,62
|
|
18
|
-
nova/mvvm/trame_binding/binding.py,sha256=
|
|
18
|
+
nova/mvvm/trame_binding/binding.py,sha256=H5iTOY5FwN1UZnxPXiYmOt36hv88e_4XzyYF1NK6KH4,12255
|
|
19
19
|
nova/mvvm/trame_binding/trame_worker.py,sha256=JmrneFU11Hi8TtY558R3yIWW8UGiUeVNO7HvM1uWTVs,3778
|
|
20
|
-
nova_mvvm-0.13.
|
|
21
|
-
nova_mvvm-0.13.
|
|
22
|
-
nova_mvvm-0.13.
|
|
23
|
-
nova_mvvm-0.13.
|
|
20
|
+
nova_mvvm-0.13.2.dist-info/METADATA,sha256=A5hCBiCeMxcBRB60XLsiIXt5UCjJMstF7C2eKdyVkuk,1027
|
|
21
|
+
nova_mvvm-0.13.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
22
|
+
nova_mvvm-0.13.2.dist-info/licenses/LICENSE,sha256=MOqZ8tPMKy8ZETJ2-HEvFTZ7dYNlg3gXmBkV-Y9i8bw,1061
|
|
23
|
+
nova_mvvm-0.13.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|