Skip to content

Commit beb6baf

Browse files
committed
Add ObservableCollection.is_empty() and IntValue.equals()
1 parent 7888a2c commit beb6baf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/spellbind/observable_sequences.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def _to_value(value: _S | Value[_S],
752752
if checker(value):
753753
return constant_factory(value)
754754
else:
755-
return value
755+
return value # type: ignore[return-value] # mypy raises an error since mypy 1.18.1, but that seems to be a bug https://github.com/python/mypy/issues/20330
756756

757757

758758
def _to_values(values: Iterable[_S | Value[_S]],

tests/test_collections/test_observable_lists/test_observable_list_is_empty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from conftest import OneParameterObserver
2-
from spellbind.observable_sequences import ObservableList, SimpleValueChangedMultipleTimesAction
2+
from spellbind.observable_sequences import ObservableList
33

44

55
def test_empty_is_empty():

0 commit comments

Comments
 (0)