Release/v0.6.0 #12
3 changed files with 4 additions and 5 deletions
|
|
@ -29,7 +29,6 @@ class BaseBindable(Generic[T]):
|
|||
def value(self) -> T:
|
||||
if self.has_value:
|
||||
return self.__value
|
||||
else:
|
||||
return self.default_value
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ def combine(
|
|||
)
|
||||
|
||||
def subscriber(_: ValueChanged[Any]) -> None:
|
||||
combined.set(combiner(*[*map(lambda s: s.value, sources)]))
|
||||
combined.set(combiner(*map(lambda s: s.value, sources)))
|
||||
|
||||
for source in sources:
|
||||
if isinstance(source, Bindable):
|
||||
|
|
@ -185,7 +185,7 @@ def async_combine(
|
|||
)
|
||||
|
||||
async def subscriber(_: ValueChanged[Any]) -> None:
|
||||
result = await combiner(*[*map(lambda s: s.value, sources)])
|
||||
result = await combiner(*map(lambda s: s.value, sources))
|
||||
await combined.set(result)
|
||||
|
||||
for source in sources:
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ MARKERS_ATTR = "__snakia_markers__"
|
|||
|
||||
|
||||
def _get_all_markers(obj: Any) -> dict[type["Marker"], "Marker"]:
|
||||
return get_or_set_attr(obj, MARKERS_ATTR, dict[type[Marker], Marker]())
|
||||
return get_or_set_attr(obj, MARKERS_ATTR, dict())
|
||||
|
||||
|
||||
class Marker:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue