ruff
5d2d6bf7 - [ty] Error when duplicate keywords are provided to TypedDict constructors (#24449)

Commit
217 days ago
[ty] Error when duplicate keywords are provided to TypedDict constructors (#24449) ## Summary E.g., in the following, we should validate that the argument is repeated, since this fails at runtime: ```python from typing import TypedDict class DuplicateHasName(TypedDict): name: str class DuplicateNeedsName(TypedDict): name: str def duplicate_name_keys( left: DuplicateHasName, right: DuplicateHasName, ) -> None: # error: [parameter-already-assigned] DuplicateNeedsName(**left, name="x") # error: [parameter-already-assigned] DuplicateNeedsName(**left, **right) ```
Author
Parents
Loading