We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{ "marimo": "0.9.20", "OS": "Darwin", "OS Version": "24.0.0", "Processor": "arm", "Python Version": "3.12.7", "Binaries": { "Browser": "--", "Node": "v23.2.0" }, "Dependencies": { "click": "8.1.7", "docutils": "0.21.2", "itsdangerous": "2.2.0", "jedi": "0.19.2", "markdown": "3.7", "narwhals": "1.13.3", "packaging": "24.2", "psutil": "6.1.0", "pygments": "2.18.0", "pymdown-extensions": "10.12", "pyyaml": "6.0.2", "ruff": "0.7.3", "starlette": "0.41.2", "tomlkit": "0.13.2", "typing-extensions": "4.12.2", "uvicorn": "0.32.0", "websockets": "12.0" }, "Optional Dependencies": { "anywidget": "0.9.13" } }
import marimo as mo import anywidget import traitlets class Foo(anywidget.AnyWidget): _esm = "" _css = "" def foo(self, arg_1, arg_2): """A dummy method.""" return arg_1 + arg_2
mo_widget = mo.ui.anywidget(Foo()) widget = Foo()
mo_widget.foo(1, 2)
widget.foo(1, 2)
The text was updated successfully, but these errors were encountered:
In case anyone else has ideas, I tried adding this code to class anywidget's __init__:
class anywidget
__init__
# Copy annotations self.__annotations__ = getattr(widget.__class__, "__annotations__", {}) # Add runtime-discovered attributes to annotations for name in dir(widget): if not name.startswith("_"): attr = getattr(widget, name) self.__annotations__[name] = type(attr)
but it did not end up working
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Screen.Recording.2024-11-22.at.00.12.08.mov
Environment
Code to reproduce
The text was updated successfully, but these errors were encountered: