Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==0.0.29→==0.0.30Release Notes
astral-sh/ty (ty)
v0.0.30Compare Source
Released on 2026-04-13.
As of v0.0.30, ty no longer unions
Unknowninto most inferred types of unannotated attributes. For example:In previous versions,
reveal_type(Foo().value)would have includedUnknown, so the assignment to"x"would not have been flagged. Since this can affect inferred attribute types throughout a codebase, upgrading may lead to both new and resolved diagnostics. Initializers ofNoneand other non-literal singleton types remain exceptions. See #24531 for details.Bug fixes
ParamSpecinConcatenateprefixes (#24474)Callabletypes (#24497)TYPE_CHECKINGstate from outer blocks (#24470)__init_subclass__calls (#24541)type[T]to a metaclass (#24515)ParamSpec-specialized class calls (#24399)TypedDictfield types as type context to inform the inference of arguments passed toTypedDictconstructors (#24422)LSP server
typingandcollectionshigher than third party re-exports (#23643)TypedDictconstructor support in the LSP by synthesizing__init__(#24476, #24522, #24535)infosubdiagnostics in LSP diagnostic messages (#24328)Diagnostics
Core type checking
Enum(...)syntax (#23602, #24570, #24571)Finalvariable assignments in__post_init__(#24529)type[...]annotations, e.g.type["MyClass"](#24518)__init_subclass__ = None(#24543)TypeGuardandTypeIsnarrowing for unbound method calls (#24612)list[int][0]leads to 1 diagnostic, rather than 2 (#24354)dataclass_transformmetadata from metaclass bases (#24615)Noneaccessors in manual property construction (#24492)Finalattributes (#24508)TypedDictunpacking (#24446)strconstructor (#24514)Unknowninto types of un-annotated attributes (#24531)super()in metaclass methods (#24483)Concatenatetype-expression parsing (#24172)if TYPE_CHECKINGblock (#24394)Contributors
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.