Skip to content

Commit

Permalink
fix: Fix type hint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ar90n committed May 31, 2022
1 parent 2149fe7 commit 24a3cf9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions alfort_dom/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ def _render(_: Any) -> None:
class DomNode(Node, Generic[M]):
dom: HTMLElement
dispatch: Dispatch[M]
handlers: dict[str, Callable[[Any], None]]
handlers: dict[str, Callable[[Any], M]]
listener: JsProxy

def __init__(
self, dom: HTMLElement, dispatch: Dispatch[M] = lambda _: None
) -> None:
def __init__(self, dom: HTMLElement, dispatch: Dispatch[M] | None = None) -> None:
self.dom = dom
self.dispatch = dispatch
self.dispatch = dispatch if dispatch is not None else lambda _: None
self.handlers = {}

def _listener(event: Any) -> None:
Expand Down

0 comments on commit 24a3cf9

Please sign in to comment.