mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00
28 lines
546 B
Python
28 lines
546 B
Python
# Regression tests for:
|
|
# https://github.com/astral-sh/ruff/issues/10812
|
|
|
|
from typing import Annotated, Literal, TypedDict
|
|
|
|
|
|
# No errors
|
|
single: TypedDict[{"foo": int}]
|
|
|
|
# Error at `qux`
|
|
multiple: TypedDict[{
|
|
"bar": str,
|
|
"baz": list["qux"],
|
|
}]
|
|
|
|
# Error at `dolor`
|
|
nested: TypedDict[
|
|
"lorem": TypedDict[{
|
|
"ipsum": "dolor"
|
|
}],
|
|
"sit": Literal["amet"]
|
|
]
|
|
|
|
# Error at `adipiscing`, `eiusmod`, `tempor`
|
|
unpack: TypedDict[{
|
|
"consectetur": Annotated["adipiscing", "elit"]
|
|
**{"sed do": str, int: "eiusmod", **tempor}
|
|
}]
|