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

False negative when multiple *args or **kwargs are used in callable with ParamSpec #9319

Closed
erictraut opened this issue Oct 24, 2024 · 1 comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@erictraut
Copy link
Collaborator

The following example should result in a type error:

from typing import Callable, ParamSpec

P = ParamSpec("P")

def run(func: Callable[P, None], *args: P.args, **kwargs: P.kwargs) -> None:
    func(*args, *args, **kwargs)
    func(*args, **kwargs, **kwargs)

This bug also exists in mypy and was reported here.

We may want to add this test to the typing spec conformance test suite.

@erictraut erictraut added the bug Something isn't working label Oct 24, 2024
erictraut added a commit that referenced this issue Oct 24, 2024
…` or `**kwargs` arguments to a callable parameterized by a ParamSpec. This addresses #9319.
erictraut added a commit that referenced this issue Oct 24, 2024
…` or `**kwargs` arguments to a callable parameterized by a ParamSpec. This addresses #9319.
erictraut added a commit that referenced this issue Oct 24, 2024
…` or `**kwargs` arguments to a callable parameterized by a ParamSpec. This addresses #9319. (#9322)
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Oct 24, 2024
@erictraut
Copy link
Collaborator Author

This is addressed in pyright 1.1.387.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant