hmr 0.6.0__tar.gz → 0.6.0.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hmr
3
- Version: 0.6.0
3
+ Version: 0.6.0.1
4
4
  Summary: Hot Module Reload for Python
5
5
  Project-URL: repository, https://github.com/promplate/pyth-on-line/tree/reactivity
6
6
  Requires-Python: >=3.12
@@ -7,7 +7,7 @@ description = "Hot Module Reload for Python"
7
7
  dependencies = [
8
8
  "watchfiles>=0.21,<2 ; sys_platform != 'emscripten'",
9
9
  ]
10
- version = "0.6.0"
10
+ version = "0.6.0.1"
11
11
 
12
12
  [project.scripts]
13
13
  hmr = "reactivity.hmr:cli"
@@ -6,7 +6,7 @@ from functools import partial
6
6
  from typing import TYPE_CHECKING, NamedTuple
7
7
 
8
8
  if TYPE_CHECKING:
9
- from .primitives import BaseComputation, Batch
9
+ from .primitives import BaseComputation
10
10
 
11
11
 
12
12
  class Context(NamedTuple):
@@ -28,20 +28,14 @@ class Context(NamedTuple):
28
28
 
29
29
  @property
30
30
  def batch(self):
31
- from .primitives import Batch
32
-
33
31
  return partial(Batch, context=self)
34
32
 
35
33
  @property
36
34
  def signal(self):
37
- from .primitives import Signal
38
-
39
35
  return partial(Signal, context=self)
40
36
 
41
37
  @property
42
38
  def effect(self):
43
- from .primitives import Effect
44
-
45
39
  return partial(Effect, context=self)
46
40
 
47
41
 
@@ -50,3 +44,5 @@ def new_context():
50
44
 
51
45
 
52
46
  default_context = new_context()
47
+
48
+ from .primitives import Batch, Effect, Signal
@@ -127,7 +127,8 @@ class Reactive[K, V](Subscribable, MutableMapping[K, V]):
127
127
 
128
128
  def items(self):
129
129
  self.track()
130
- return ({k: v.get() for k, v in self._signals.items()}).items()
130
+ unset = self.UNSET
131
+ return ({k: v for k, signal in self._signals.items() if (v := signal.get()) is not unset}).items()
131
132
 
132
133
 
133
134
  class DerivedProperty[T, I]:
@@ -344,4 +344,4 @@ def cli():
344
344
  reloader.keep_watching_until_interrupt()
345
345
 
346
346
 
347
- __version__ = "0.6.0"
347
+ __version__ = "0.6.0.1"
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