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

Type annotate Parameter.rx property #7572

Open
MarcSkovMadsen opened this issue Dec 26, 2024 · 0 comments
Open

Type annotate Parameter.rx property #7572

MarcSkovMadsen opened this issue Dec 26, 2024 · 0 comments

Comments

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Dec 26, 2024

VS Code and other editors relying on static typing does not understand what rx_expression below is because Parameter.rx property is not type annotated:

import param
class P(param.Parameterized):
    a = param.Number()
p = P(a=1)
rx_expression = p.param.a.rx()

This is a huge bummer on developer experience as you don't get any help from there.

Please type annotate it. It probably requires some reordering of the code to avoid circular imports.

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

No branches or pull requests

1 participant