holoviz / holoviz/param

Support Intellicode in VS Code. Probably using dataclass_transforms

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

Description

Currently the HoloViz system is difficult to use in VS Code with as you don't get any context help. For example for Panel the only thing you get is

![image](https://user-images.githubusercontent.com/42288570/149264261-b1fc5bbc-8c53-4e4b-bbe4-1c671a11470f.png)

I.e. you don't get any docstring. You don't get any information on the arguments the `__init__` accepts.

@philippjfr points out in https://github.com/holoviz/panel/issues/3085 that *..., we explicitly enabled [signatures](https://www.python.org/dev/peps/pep-0362/) on Parameterized class constructors which should be the accepted way to declare the accepted kwargs.*

@brettcannon points out in https://github.com/holoviz/panel/issues/3085 that *For attrs at least, they implemented https://github.com/microsoft/pyright/blob/main/specs/dataclass_transforms.md which I believe is in the process of becoming a proposed PEP. It's documented at https://www.attrs.org/en/stable/extending.html?highlight=pyright#pyright .*

## Suggestion

- Review the above specifications and potentially suggest improvements
- Determine whether `dataclass_transforms` is a solution for Param. And if it is implement.

The alternative would be to reach out to [pyright](https://github.com/microsoft/pyright/issues) and ask why they don't use the `signatures` of pep362 and/ or if they could.

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.