ruff
f5213580 - [red-knot] No errors for definitions of `TypedDict`s (#17674)

Commit
274 days ago
[red-knot] No errors for definitions of `TypedDict`s (#17674) ## Summary Do not emit errors when defining `TypedDict`s: ```py from typing_extensions import TypedDict # No error here class Person(TypedDict): name: str age: int | None # No error for this alternative syntax Message = TypedDict("Message", {"id": int, "content": str}) ``` ## Ecosystem analysis * Removes ~ 450 false positives for `TypedDict` definitions. * Changes a few diagnostic messages. * Adds a few (< 10) false positives, for example: ```diff + error[lint:unresolved-attribute] /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_utils.py:262:5: Type `Literal[DataclassOptions]` has no attribute `__required_keys__` + error[lint:unresolved-attribute] /tmp/mypy_primer/projects/hydra-zen/src/hydra_zen/structured_configs/_utils.py:262:42: Type `Literal[DataclassOptions]` has no attribute `__optional_keys__` ``` * New true positive https://github.com/zulip/zulip/blob/4f8263cd7f4d00fc9b9e7d687ab98b0cc8737308/corporate/lib/remote_billing_util.py#L155-L157 ```diff + error[lint:invalid-assignment] /tmp/mypy_primer/projects/zulip/corporate/lib/remote_billing_util.py:155:5: Object of type `RemoteBillingIdentityDict | LegacyServerIdentityDict | None` is not assignable to `LegacyServerIdentityDict | None` ``` ## Test Plan New Markdown tests
Author
Parents
Loading