-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Visit PEP 764 inline TypedDict
s' keys as non-type-expressions
#15073
Conversation
|
The |
Yeah, we should remove it if it's not being used currently. I'll also make a general recommendation to use Apart from this, I'm not exactly sure what the scope of this should be as the PEP is still in draft so we don't know where all we need to change this. What about when the slice element is not a dictionary like the one in your test case? I don't see it being supported in the PEP yet. Should we only limit it to the following syntax (https://github.com/Viicos/peps/blob/inlined-typed-dictionaries/peps/pep-0764.rst#typing-specification-changes)?
|
@dhruvmanila When the expression is not a dictionary literal, This PR could be considered provisional support for the PEP. Pyright (and Basedpyright) already did so; parity by other tools could help the PEP gain wider recognition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* main: Add all PEP-585 names to UP006 rule (#5454) [`flake8-simplify`] More precise inference for dictionaries (`SIM300`) (#15164) `@no_type_check` support (#15122) Visit PEP 764 inline `TypedDict`s' keys as non-type-expressions (#15073) [red-knot] Add diagnostic for invalid unpacking (#15086) [`flake8-use-pathlib`] Catch redundant joins in `PTH201` and avoid syntax errors (#15177) Update Rust crate glob to v0.3.2 (#15185) Update astral-sh/setup-uv action to v5 (#15193) Update dependency mdformat-mkdocs to v4.1.1 (#15192) Update Rust crate serde_with to v3.12.0 (#15191) Update NPM Development dependencies (#15190) Update pre-commit hook rhysd/actionlint to v1.7.5 (#15189) Update Rust crate syn to v2.0.93 (#15188) Update Rust crate serde to v1.0.217 (#15187) Update Rust crate quote to v1.0.38 (#15186) Update Rust crate compact_str to v0.8.1 (#15184) [`flake8-type-checking`] Disable TC006 & TC007 in stub files (#15179) Test explicit shadowing involving `def`s (#15174) Fix typo in `NameImport.qualified_name` docstring (#15170) [airflow]: extend names moved from core to provider (AIR303) (#15159)
Summary
Resolves #10812.
Test Plan
cargo nextest run
andcargo insta test
.