Skip to content
New issue

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

realtime plugin: allow str for JsCode arg #1862

Merged

Conversation

Conengmo
Copy link
Member

Idea split off from #1856.

For defined keyword arguments that expect a Javascript function, allow not only the new JsCode class, but also str. Adapt JsCode to allow both str and JsCode arguments for easier instantiation.

This means that users can use these keyword arguments without having to deal with JsCode. And JsCode is only necessary for undefined keyword arguments that are Javascript functions.

Upside of this is that users have less classes to worry about when using this plugin. Downside is it may be confusing that using a string doesn't work for undefined keyword arguments that are Javascript functions. But since that's a more advanced move, I hope those users can read and understand the docstring.

@Conengmo Conengmo merged commit 36f2ff6 into python-visualization:main Feb 28, 2024
12 checks passed
@Conengmo Conengmo deleted the realtime-jscode-allow-string branch February 28, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant