holoviz / holoviz/param

Warn if .param accessed without super call

Open
#1,071 8 comments 0 reactions 0 assignees View on GitHub
type-feature
Dominant language
Python
Stars
521
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
35

Description

This is a mistake I am sure a lot of users can get confused by as shown in this screenshot. While this example uses `panel`, the principles are all based on `param`:

Image

Cell 3 doesn't update the Markdown where the mistake is that `super()` wasn't called in the `__init__` of the parameterized class.

It would be very helpful if a warning could be issued if `super()` hasn't been called. Here I believe `bind` is watching the class parameter instead - if using the `.param` accessor warned when the object hasn't been properly initialized, that might be quite helpful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.