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

Fix HTML repr for Parameterized subobjects #831

Merged
merged 2 commits into from
Sep 16, 2023
Merged

Fix HTML repr for Parameterized subobjects #831

merged 2 commits into from
Sep 16, 2023

Conversation

maximlt
Copy link
Member

@maximlt maximlt commented Sep 13, 2023

Fixes #822

This regression was due to having moved _repr_html_ from Parameterized to Parameters. I've added a basic test what would have caught it (cherry picked bcb8a4c to avoid some warnings).

image image
import param

class Sub(param.Parameterized):
    xsub = param.Parameter()

class P(param.Parameterized):
    constant = param.Parameter(constant=True)
    readonly = param.Parameter(readonly=True)
    allow_None = param.Parameter(1, allow_None=False)
    bounds = param.Number(bounds=(-10, 10))
    objects_list = param.Selector(objects=[1, 2])
    objects_dict = param.Selector(objects=dict(a=1, b=2))
    sub = param.ClassSelector(default=Sub(xsub=1), class_=Sub)


P().param

@maximlt maximlt merged commit b7bb742 into main Sep 16, 2023
@maximlt maximlt deleted the fix_html_subparam branch September 16, 2023 08:55
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.

HTML repr for Parameterized subobjects
1 participant