What common Class can I use to type annotate any of a pane, widget or layout with?

I like to type annotate things and often times the argument or result of one of my functions can be anything from the pane, layout or widgets modules.

examples are HTML, Column or Button.

What is the common class that I can use for type annotations or for example for the class_ of param.List?

This is an example

class Model(param.Parameterized):
    body = param.List(class_=???)

where the body can be anything and will be wrapped in a Column.

This is another example where the element can be anything and will be wrapped inside a Column together with other elements.

def view(element: ???) -> pn.Column:

I’d use pn.viewable.Viewable.

1 Like