param icon indicating copy to clipboard operation
param copied to clipboard

Add pytypes property to parameters to return Python type declaration

Open philippjfr opened this issue 2 years ago • 3 comments

Decided to split out the less experimental part of https://github.com/holoviz/param/pull/636. This PR adds a pytypes property to all Parameters that returns a Python type declaration for a specific parameter. This can be used in a number of ways, e.g. for documentation but also eventually for a tool that can automatically generate types for Parameterized classes (which I had prototyped in #636).

philippjfr avatar Jan 09 '23 17:01 philippjfr

@philippjfr do you need this in 2.0?

maximlt avatar Apr 05 '23 10:04 maximlt

I'll be glad to have this mapping between Parameter types and py3 types, but I can't comment on whether this is the best way to achieve that. Up to @philippjfr .

jbednar avatar May 12 '23 21:05 jbednar

I don't think it's ready, I want to revisit this as part of a more general plan for composite types as well as dataclass and pydantic integrations.

philippjfr avatar May 12 '23 21:05 philippjfr