pyview-web 0.0.24__py3-none-any.whl → 0.0.25__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.

Potentially problematic release.


This version of pyview-web might be problematic. Click here for more details.

@@ -11,19 +11,24 @@ def calc_diff(old_tree: dict[str, Any], new_tree: dict[str, Any]) -> dict[str, A
11
11
  and "s" in new_tree[key]
12
12
  and "d" in new_tree[key]
13
13
  ):
14
+ if isinstance(old_tree[key], str):
15
+ diff[key] = new_tree[key]
16
+ continue
17
+
14
18
  # Handle special case of for loop
19
+ old_static = old_tree[key].get("s", [])
20
+ new_static = new_tree[key]["s"]
21
+
15
22
  old_dynamic = old_tree[key]["d"]
16
23
  new_dynamic = new_tree[key]["d"]
17
24
 
18
- old_static = old_tree[key]["s"]
19
- new_static = new_tree[key]["s"]
20
-
21
25
  if old_static != new_static:
22
26
  diff[key] = {"s": new_static, "d": new_dynamic}
23
27
  continue
24
28
 
25
29
  if old_dynamic != new_dynamic:
26
30
  diff[key] = {"d": new_dynamic}
31
+
27
32
  elif isinstance(new_tree[key], dict):
28
33
  nested_diff = calc_diff(old_tree[key], new_tree[key])
29
34
  if nested_diff:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyview-web
3
- Version: 0.0.24
3
+ Version: 0.0.25
4
4
  Summary: LiveView in Python
5
5
  Home-page: https://pyview.rocks
6
6
  License: MIT
@@ -20,7 +20,7 @@ pyview/session.py,sha256=nC8ExyVwfCgQfx9T-aJGyFhr2C7jsrEY_QFkaXtP28U,432
20
20
  pyview/static/assets/app.js,sha256=QoXfdcOCYwVYJftvjsIIVwFye7onaOJMxRpalyYqoMU,200029
21
21
  pyview/template/__init__.py,sha256=c5hLRfsF2fDOz8aOsoOgoCeBV6VBzdqN_Ktg3mYPw8A,509
22
22
  pyview/template/live_template.py,sha256=wSKyBw7ejpUY5qXUZdE36Jeeix8Of0CUq8eZdQwxXyg,1864
23
- pyview/template/render_diff.py,sha256=UpmxQZ-ImDqEUIehcoLfpdClRVYV5StTOP9iKsU8AZ0,1090
23
+ pyview/template/render_diff.py,sha256=v7EVmn8oJdh809N0vnSLK8OiDs1BOpErF36y4VUo9ew,1214
24
24
  pyview/template/root_template.py,sha256=zCUs1bt8R7qynhBE0tTSEYfdkGtbeKNmPhwzRiFNdsI,2031
25
25
  pyview/template/serializer.py,sha256=WDZfqJr2LMlf36fUW2CmWc2aREc63553_y_GRP2-qYc,826
26
26
  pyview/template/utils.py,sha256=S8593UjUJztUrtC3h1EL9MxQp5uH7rFDTNkv9C6A_xU,642
@@ -40,7 +40,7 @@ pyview/vendor/ibis/template.py,sha256=IX9z-Ig13yJyRnMqtB52eiRLe002qdIxnfa7fYEXLq
40
40
  pyview/vendor/ibis/tree.py,sha256=hg8f-fKHeo6DE8R-QgAhdvEaZ8rKyz7p0nGwPy0CBTs,2509
41
41
  pyview/vendor/ibis/utils.py,sha256=nLSaxPR9vMphzV9qinlz_Iurv9c49Ps6Knv8vyNlewU,2768
42
42
  pyview/ws_handler.py,sha256=Vi5aIoxz_Z9qOEcA5fgxsSoJtLz7n_ytbJ8vZiWDvGc,8473
43
- pyview_web-0.0.24.dist-info/LICENSE,sha256=M_bADaBm9_MV9llX3lCicksLhwk3eZUjA2srE0uUWr0,1071
44
- pyview_web-0.0.24.dist-info/METADATA,sha256=KVSbBZVtJ6Ft3W2ZQh1NFBYM_i3xamA3B9AM-2O-TAw,5276
45
- pyview_web-0.0.24.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
46
- pyview_web-0.0.24.dist-info/RECORD,,
43
+ pyview_web-0.0.25.dist-info/LICENSE,sha256=M_bADaBm9_MV9llX3lCicksLhwk3eZUjA2srE0uUWr0,1071
44
+ pyview_web-0.0.25.dist-info/METADATA,sha256=-UhlfnbHQaDx-Elu2KFZRxrV2brUwuJ2GAwFfrRWRGU,5276
45
+ pyview_web-0.0.25.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
46
+ pyview_web-0.0.25.dist-info/RECORD,,