Skip to content

Commit

Permalink
not using static initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Sep 18, 2023
1 parent 7c08c6f commit 762cdd4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nicegui/observables.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def __iadd__(self, other: Any) -> Any:

class ObservableSet(set):

def __init__(self, data: set = set(), on_change: Optional[Callable] = None) -> None:
def __init__(self,
data: set = None, # type: ignore
on_change: Optional[Callable] = None,
) -> None:
if data is None:
data = set()
super().__init__(data)
for item in self:
super().add(make_observable(item, on_change))
Expand Down

0 comments on commit 762cdd4

Please sign in to comment.