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 on insufficient arguments with *args: *tuple[?] since 1.1.382 #9183

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

Comments

@Azureblade3808
Copy link
Contributor

Describe the bug

When a function has variadic arguments with type of unpacking a tuple, calling it with insufficient argument(s) incorrectly passes type checking.

It used to work with Pyright 1.1.381.

Code or Screenshots

def f(*args: *tuple[int, str]): ...

f()  # Expected to be reported, but not.
f(0)  # Expected to be reported, but not.
f(0, "")  # Passes.

VS Code extension or command-line

Pyright 1.1.382 & 1.1.383

@Azureblade3808 Azureblade3808 added the bug Something isn't working label Oct 9, 2024
erictraut added a commit that referenced this issue Oct 12, 2024
… a function with an `*args` parameter annotated with an unpacked `tuple`. This addresses #9183.
erictraut added a commit that referenced this issue Oct 12, 2024
… a function with an `*args` parameter annotated with an unpacked `tuple`. This addresses #9183. (#9215)
@erictraut erictraut added the addressed in next version Issue is fixed and will appear in next published version label Oct 12, 2024
@erictraut
Copy link
Collaborator

This is addressed in pyright 1.1.385.

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 regression
Projects
None yet
Development

No branches or pull requests

2 participants