Explorar o código

Set event handler module name (#930)

Nikhil Rao %!s(int64=2) %!d(string=hai) anos
pai
achega
ba7225e37c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      pynecone/state.py

+ 1 - 0
pynecone/state.py

@@ -98,6 +98,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
         # Convert the event handlers to functions.
         for name, event_handler in self.event_handlers.items():
             fn = functools.partial(event_handler.fn, self)
+            fn.__module__ = event_handler.fn.__module__  # type: ignore
             fn.__qualname__ = event_handler.fn.__qualname__  # type: ignore
             setattr(self, name, fn)