-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
astral-sh/ruff
#18020Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation
Description
Summary
def print_list(value: list[str]) -> None:
print(value)
existing_list = ["foo"]
print_list(
existing_list
+ [
"bar",
],
) --> test.py:7:5
|
5 | existing_list = ["foo"]
6 | print_list(
7 | / existing_list
8 | | + [
9 | | "bar",
10 | | ],
| |_____^ Expected `list[str]`, found `list[_T]`
11 | )
|
info: Function defined here
--> test.py:1:5
|
1 | def print_list(value: list[str]) -> None:
| ^^^^^^^^^^ ---------------- Parameter declared here
2 | print(value)
|
info: `invalid-argument-type` is enabled by default
Found 1 diagnosticVersion
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementation