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

kwargs forwarding? #1971

Open
kflu opened this issue Nov 21, 2023 · 1 comment
Open

kwargs forwarding? #1971

kflu opened this issue Nov 21, 2023 · 1 comment
Labels

Comments

@kflu
Copy link

kflu commented Nov 21, 2023

I noticed that jedi can handle basic kwargs forwarding:

def f(a,b,c): ...

def g(**kwargs):
  return f(**kwargs)

Typing g( it prompts a,b,c.

However, the below won't work:

@click.option(...)
def f(a,b,c): ...

def g(**kwargs):
  return f.callback(**kwargs)

Our codebase uses @click (for the record I disliked it). And because of that, the original function becomes f.callback. But now typing g(, jedi won't prompt for a,b,c anymore.

My question is, is there a way to help jedi to understand kwargs forwarding? I tried typing.ParamSpec, but seems like jedi doesn't support it yet.

I'm using jedi through jedi-language-server

@davidhalter
Copy link
Owner

Yeah, sorry but ParamSpec is not yet supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants