[ty] Infer the extra_items keyword argument to class-based TypedDicts as an annotation expression by AlexWaygood · Pull Request #24362 · astral-sh/ruff (original) (raw)
added the ty
Multi-file analysis & type inference
label
Base automatically changed from alex/functional-td-qualifiers to main
…ts as an annotation expression
carljm removed their request for review
carljm added a commit that referenced this pull request
- main:
Document adding fixes in CONTRIBUTING.md (#24393)
Sort formatter diagnostics in snapshots (#24375)
[
pyupgrade] Fix panic caused by handling of octals inUP012(#24390) Upgrade to nix v0.31.2 (#24385) Strip form feeds from indent passed todedent_to(#24381) add recent move of thedeferredsubmodule to.git-blame-ignore-revs(#24379) [ty] Fix extra_items TypedDict tests (#24367) [ty] Useinfer_type_expressionfor validating PEP-613 type aliases (#24370) [flake8-simplify] Make the fix forcollapsible-if(SIM102) safe inpreview(#24371) [ty] Validate TypedDict fields when subclassing (#24338) [ty] pass type context to sequence literals in binary operations (#24197) Add release environment to notify-dependents job (#24372) Bump 0.15.9 (#24369) [ty] Move thedeferredsubmodule insideinfer/builder(#24368) [ty] Infer theextra_itemskeyword argument to class-based TypedDicts as an annotation expression (#24362) [ty] Validate type qualifiers in functional TypedDict fields and theextra_itemskeyword to functional TypedDicts (#24360)
knutwannheden added a commit to openrewrite/ty-types that referenced this pull request
…Concatenate
Bumps ruff submodule to pull in astral-sh/ruff main through ty 0.0.31 (openrewrite/ruff ty-types-2 tip 1f844143e8).
API shim changes:
- ProjectDatabase::new → ProjectDatabase::fallible; the constructor now
takes a MisconfigurationStrategy, and
falliblematches our prior error-propagating behavior. - ClassLiteral gained DynamicTypedDict / DynamicEnum variants; replace the per-variant match in supertypes_from_class_literal with the uniform ClassLiteral::explicit_bases(db), which already handles them.
- Type gained a Divergent(DivergentType) cycle marker; folded into the Other fallback alongside DataclassDecorator / BoundSuper.
New wire-protocol fields on ParameterInfo:
- concatenatePrefix (bool) — set on leading positional params of a Concatenate[T1, ..., Tn, P] / Concatenate[T1, ..., Tn, ...] signature.
- paramSpecName (string) — set on the synthesized *args / **kwargs entries that stand in for a ParamSpec tail, carrying that ParamSpec's name.
Both fields are omitted when absent, so consumers that ignore unknown fields see no change.
TypedDict.extraItems is noted as a TODO in registry.rs: ty's inference-side parsing landed in astral-sh/ruff#24362, but the public accessor on TypedDictType is still unavailable.
knutwannheden added a commit to openrewrite/ty-types that referenced this pull request
…Concatenate (#14)
- Update ruff submodule to latest ty-types-2 branch; surface ParamSpec/Concatenate
Bumps ruff submodule to pull in astral-sh/ruff main through ty 0.0.31 (openrewrite/ruff ty-types-2 tip 1f844143e8).
API shim changes:
- ProjectDatabase::new → ProjectDatabase::fallible; the constructor now
takes a MisconfigurationStrategy, and
falliblematches our prior error-propagating behavior. - ClassLiteral gained DynamicTypedDict / DynamicEnum variants; replace the per-variant match in supertypes_from_class_literal with the uniform ClassLiteral::explicit_bases(db), which already handles them.
- Type gained a Divergent(DivergentType) cycle marker; folded into the Other fallback alongside DataclassDecorator / BoundSuper.
New wire-protocol fields on ParameterInfo:
- concatenatePrefix (bool) — set on leading positional params of a Concatenate[T1, ..., Tn, P] / Concatenate[T1, ..., Tn, ...] signature.
- paramSpecName (string) — set on the synthesized *args / **kwargs entries that stand in for a ParamSpec tail, carrying that ParamSpec's name.
Both fields are omitted when absent, so consumers that ignore unknown fields see no change.
TypedDict.extraItems is noted as a TODO in registry.rs: ty's inference-side parsing landed in astral-sh/ruff#24362, but the public accessor on TypedDictType is still unavailable.
- Apply cargo fmt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})