Skip to content

Releases: astral-sh/ty

0.0.1-alpha.17

06 Aug 12:14
1712284

Choose a tag to compare

0.0.1-alpha.17 Pre-release
Pre-release

Release Notes

Bug fixes

  • Always refresh diagnostics after a watched files change (#19697)
  • Correctly instantiate generic class that inherits __init__ from generic base class (#19693)
  • Don't panic with argument that doesn't actually implement Iterable (#19602)
  • Fix "peek definition" in playground (#19592)
  • Fix empty spans following a line terminator and unprintable character spans in diagnostics (#19535)
  • Fix incorrect diagnostic when calling __setitem__ (#19645)
  • Fix lookup order of class variables before they are defined (#19743)
  • Fix more false positives related to Generic or Protocol being subscripted with a ParamSpec or TypeVarTuple (#19764)
  • Keep track of type qualifiers in stub declarations without right-hand side (#19756)

Server

  • Add progress reporting to workspace diagnostics (#19616)
  • Add stub mapping support to signature help (#19570)
  • Added support for "document symbols" and "workspace symbols" (#19521)
  • Fix server panic in workspace diagnostics request handler when typing (#19631)
  • Implement caching for workspace and document diagnostics (#19605)
  • Implement long-polling for workspace diagnostics (#19670)
  • Implement streaming for workspace diagnostics (#19657)
  • Implemented support for "selection range" language server feature (#19567)

CLI

  • Add progress bar to --watch mode (#19729)
  • Clear the terminal screen in --watch mode (#19712)
  • Resolve file symlinks in src walk (#19674)

Typing semantics and features

  • Support async/await, async with and yield from (#19595)
  • Add support for async for loops and async iterables (#19634)
  • Don't include already-bound legacy typevars in function generic context (#19558)
  • Infer types for key-based access on TypedDicts (#19763)
  • Improve isinstance() truthiness analysis for generic types (#19668)
  • Infer type[tuple[int, str]] as the meta-type of tuple[int, str] (#19741)
  • Remove false positives when subscripting Generic or Protocol with a ParamSpec or TypeVarTuple (#19749)
  • Remove special casing for string-literal-in-tuple __contains__ (#19642)
  • Remove special casing for tuple addition (#19636)
  • Return Option<TupleType> from infer_tuple_type_expression (#19735)
  • Support as-patterns in reachability analysis (#19728)
  • Support __setitem__ and improve __getitem__ related diagnostics (#19578)
  • Synthesize precise __getitem__ overloads for tuple subclasses (#19493)
  • Track different uses of legacy typevars, including context when rendering typevars (#19604)
  • Upcast heterogeneous and mixed tuples to homogeneous tuples where it's necessary to solve a TypeVar (#19635)
  • Fix incorrect lazy scope narrowing (#19744)
  • Synthesize __replace__ for dataclasses (#19545)

Diagnostics

  • Add diagnostics for async context managers (#19704)
  • Display generic function signature properly (#19544)
  • Improve the Display for generic type[] types (#19667)
  • Remap Jupyter notebook cell indices in ruff_db (#19698)

Documentation

  • Add the ty badge (#897)

Contributors

Install ty 0.0.1-alpha.17

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.17/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.17/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.17

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux [checksum](https://github...
Read more

0.0.1-alpha.16

25 Jul 14:01
c452e53

Choose a tag to compare

0.0.1-alpha.16 Pre-release
Pre-release

Release Notes

Bug fixes

  • Fix server panics when hovering over invalid syntax in Callable annotations (#19517)
  • match statements: Fix narrowing and reachability of class patterns with arguments (#19512)
  • Fix server panics when hovering over illegal Literal[…] annotations with inner subscript expressions (#19489)
  • Pass down specialization to generic dataclass bases (#19472)

Server

  • Add support for "go to definition" for attribute accesses and keyword arguments (#19417)
  • Add support for "go to definition" for import statements (#19428)
  • Add support for "document highlights" (#19515)
  • Add partial support for "find references" (#19475)
  • Prefer the runtime definition, not the stub definition, on a go-to-definition request for a class or function. Currently this is only implemented for definitions originating outside of the stdlib. (#19471)
  • Add semantic token support for more identifiers (#19473)
  • Avoid rechecking the entire project when a file in the editor is opened or closed (#19463)

Typing semantics and features

  • Handle splatted arguments in function calls (#18996)
  • Improve place lookup and narrowing in lazy scopes (#19321)
  • Add exhaustiveness checking and reachability analysis for match statements (#19508)
  • Improve reachability analysis for isinstance(…) branches (#19503)
  • Make tuple subclass constructors sound (#19469)
  • Extend tuple __len__ and __bool__ special casing to also cover tuple subclasses (#19289)
  • Add support for dataclasses.field (#19553)
  • Add support for dataclasses.InitVar (#19527)
  • Add support for @warnings.deprecated and typing_extensions.deprecated (#19376)
  • Do not consider a type T to satisfy a method member on a protocol unless the method is available on the meta-type of T (#19187)
  • Implement expansion of enums into unions of literals (#19382)
  • Support iterating over enums (#19486)
  • Detect enums if metaclass is a subtype of EnumType / EnumMeta (#19481)
  • Infer single-valuedness for enums deriving from int or str (#19510)
  • Detect illegal non-enum attribute accesses in Literal annotations (#19477)
  • Disallow assignment to Final class attributes (#19457)
  • Handle implicit instance attributes declared Final (#19462)
  • Disallow Final in function parameter- and return-type annotations (#19480)
  • Disallow illegal uses of ClassVar (#19483)
  • Make del x force a local resolution of x in the current scope (#19389)
  • Perform type narrowing for places marked global (#19381)
  • Infer correct types for attribute accesses on intersections with negative parts (#19524)
  • Sync vendored typeshed stubs (typeshed diff)

Memory usage optimizations

Contributors

Install ty 0.0.1-alpha.16

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.16/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.16/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.16

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
[ty-arm-unknown-linux-musleabihf.tar.gz](https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.16/ty-arm-unknown-linux-musleabihf.tar.g...
Read more

0.0.1-alpha.15

18 Jul 13:03
0369a35

Choose a tag to compare

0.0.1-alpha.15 Pre-release
Pre-release

Release Notes

Bug fixes

  • Avoid stale diagnostics for open-files diagnostic mode (#19273)
  • Fix inconsistent semantic syntax highlighting for parameters (#19418)
  • Fix checking of virtual files after re-opening from an unsaved edit (#19277)
  • Show the correct ty version in the LSP server (#19284)
  • Do not surface settings errors in unrelated Python files (#19206)
  • Do not ignore conditionally defined dataclass fields (#19197)
  • Fix panic for attribute expressions with empty value (#19069)
  • Fix assignabiliy of dataclasses to Callable types (#19192)
  • Fix __setattr__ call check precedence during attribute assignment (#18347)

Server

  • Add definition and declaration providers (go-to-definition, go-to-declaration) (#19371)
  • Add signature help provider (show signature and docstring when writing a call expression) (#19194)
  • Add "kind" to completion suggestions (#19216)
  • Add completions for submodules that aren't attributes of their parent (#19266)
  • Filter out private type aliases from stub files when offering autocomplete suggestions (#19282)
  • Handle configuration errors in the LSP more gracefully (#19262)
  • Use Python version and path from VSCode Python extension (#19012)
  • Publish errors in settings as LSP diagnostics (#19335)

Typing semantics and features

  • Add support for nonlocal statements (#19112)
  • Support empty function bodies in if TYPE_CHECKING blocks (#19372)
  • Emit a diagnostic when attempting to modify a typing.Final-qualified symbol (#19178)
  • Infer enum literal types when accessing enum members (#19328)
  • Synthesize __setattr__ for frozen dataclasses (#19307)
  • Improve equivalence for module-literal types (#19243)
  • Reduce false positives for TypedDict types (#19354)
  • Emit an error for global uses if there is no explicit definition in the global scope (#19344)
  • Sync vendored typeshed stubs (typeshed diff)

CLI

  • Add a -q/--quiet mode, -qq for silent output mode (#19233)

Contributors

Install ty 0.0.1-alpha.15

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.15/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.15/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.15

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.14

08 Jul 11:58
3ececb0

Choose a tag to compare

0.0.1-alpha.14 Pre-release
Pre-release

Release Notes

Bug fixes

  • Add cycle detection to ty's implementation of disjointness between types, fixing a possible source of stack overflows when analysing recursive types (#19139)
  • Don't allow first-party code to shadow the stdlib types module (#19128).
    This fixes another possible source of stack overflows.
  • Fix descriptor lookups for most types that overlap with None (#19120).
    This means that e.g. object().__str__() now correctly binds the self argument of the __str__
    method, as the object type overlaps with None.

Server

  • Filter a symbol from a stub file in autocomplete suggestions if it is an implementation detail of the stub (#19121)
  • Add initial support for semantic tokens (#19108).
    This feature allows editors to apply more advanced syntax highlighting. Currently, the supported tokens are: Namespace, Class, Parameter, SelfParameter,ClsParameter, Variable, Property, Function, Method, Keyword, String, Number, Decorator, BuiltinConstant and TypeParameter.
  • Initial support for workspace diagnostics (#18939).
    Enable this feature by setting the ty.diagnosticMode configuration setting to "workspace".
  • Use Python syntax highlighting in on-hover content (#19082)

Typing semantics and features

  • Understand that calls to functions returning Never / NoReturn are terminal with respect to control flow (#18333)
  • Add subtyping between type[] types and Callable types (#19026)
  • Support bare ClassVar annotations (#15768)
  • Understand that two protocols with equivalent method members are equivalent (#18659)
  • Support declared-only instance attributes such as self.x: int (#19048)
  • Sync vendored typeshed stubs (#19174): typeshed diff
  • Use the inferred type as the declared type for bare Final symbols (#19142)

Contributors

Install ty 0.0.1-alpha.14

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.14/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.14/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.14

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.13

02 Jul 17:52
6a408d5

Choose a tag to compare

0.0.1-alpha.13 Pre-release
Pre-release

Release Notes

Bug fixes

  • Fix stack overflows related to mutually recursive protocols (#19003)
  • Don't add incorrect subdiagnostic for unresolved-reference in staticmethods and classmethods (#18487)
  • Fix rendering of long lines in diagnostic messages that are indented with tabs (#18962)
  • Fix reachability of star import definitions for nonlocal lookups (#19066)

Typing semantics and features

  • Support variable-length tuples in unpacking assignments (#18948)
  • Allow declared-only class-level attributes to be accessed on the class (#19071)
  • Infer nonlocal types as unions of all reachable bindings (#18750)
  • Use all reachable bindings for instance attributes and deferred lookups (#18955)
  • Improve protocol member type checking and relation handling (#18847)
  • Rework disjointness of protocol instances vs types with possibly unbound attributes, preventing some false instances of Never in hasattr narrowing (#19043)
  • Make tuple instantiations sound (#18987)
  • Add subdiagnostic about empty bodies in more cases (#18942)
  • Improve type-inference for __import__(name) and importlib.import_module(name) (#19008)
  • Eagerly evaluate certain constraints when analyzing control flow (#18998, #19044, #19068)
  • Update typeshed stubs (#19060): typeshed diff

Server

  • Add builtins to completions (#18982)
  • Support LSP go-to with vendored typeshed stubs (#19057)

Documentation

Performance

  • Remove ScopedExpressionId (#19019)

Contributors

Install ty 0.0.1-alpha.13

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.13/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.13/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.13

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.12

25 Jun 11:50
f7446a6

Choose a tag to compare

0.0.1-alpha.12 Pre-release
Pre-release

Release Notes

Bug fixes

  • Avoid duplicate diagnostic when reporting errors in unpacked assignments (#18897)
  • Fix panics when "pulling types" for ClassVar or Final parameterized with >1 argument (#18824). These could cause issues when hovering over symbols in an IDE.

Improved modeling of Python runtime semantics

  • Add support for @staticmethods (#18809)
  • Discover implicit class attribute assignments in @classmethod-decorated methods. Recognize that assignments in the body of a @staticmethod-decorated method are never instance attributes (#18587)
  • Report when a dataclass contains more than one KW_ONLY field (#18731)

Type narrowing improvements

  • Ty will now perform isinstance() and issubclass() narrowing when the second argument is a union type, intersection type or TypeVar type (#18900)
  • Ty now narrows types in comprehensions and generator expressions (#18934)
  • Understand two NominalInstanceTypes as disjoint types if attempting to use multiple inheritance with their underlying classes would result in an instance memory layout conflict (#18864)

Other typing semantics features

  • Support "mixed" tuples such as tuple[int, *tuple[str, ...]] (#18600, #18901)
  • Support type inference for subscript expressions on union types (#18846)
  • Introduce a new subtyping framework in which gradual types can participate, allowing for more advanced union type simplification (#18799)
  • Surface the matched overload directly when reporting a diagnostic for an invalid call to an overloaded function (#18452)

Improvements to server autocompletions

  • Add completions for from module import <CURSOR> (#18830)
  • Enforce sort order of completions (#18917)
  • Include imported sub-modules as attributes on modules for completions (#18898)

Configuration

  • Anchor all src.exclude patterns, for consistency with src.include patterns (#18685)
  • Change environment.root to accept multiple paths (#18913)
  • Rename src.root setting to environment.root (#18760)
  • Support --python=<symlink to executable> (#18827)

Contributors

Install ty 0.0.1-alpha.12

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.12/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.12/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.12

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.11

17 Jun 20:50
1ae7038

Choose a tag to compare

0.0.1-alpha.11 Pre-release
Pre-release

Release Notes

Breaking changes

  • Stabilize auto-complete; remove the opt-in experimental setting (#18650)

Bug fixes

  • Fix binary expression inference between Boolean literals and bool instances (#18663)
  • Fix panic that could occur when printing a class's "header" in diagnostic messages (#18670)
  • Fix panic when attempting to provide autocompletions for an instance of a class that assigns attributes to self[0] (#18707)
  • Fix panics when "pulling types" for various special forms that have the wrong number of parameters. These could cause issues when hovering over symbols in an IDE. (#18642)

Typing semantics and features

  • Support type narrowing for attribute and subscript expressions (#17643)
  • Add partial support for TypeIs (#18589)
  • Support dataclasses.KW_ONLY (#18677)
  • Filter overloads based on Any / Unknown (#18607)
  • Improve reachability analysis (#18621)
  • Model T: Never as a subtype of Never (#18687)
  • Update typeshed stubs (#18679): typeshed diff

Configuration

  • Allow overriding rules for specific files (#18648)

Server

  • Add python.ty.disableLanguageServices config (#18230)

Contributors

Install ty 0.0.1-alpha.11

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.11/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.11/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.11

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.10

13 Jun 20:33
15bae14

Choose a tag to compare

0.0.1-alpha.10 Pre-release
Pre-release

Release Notes

Server

  • Improve support for object.<CURSOR> completions (#18629)

Configuration

  • Add file inclusion and exclusion (#18498)
  • Infer the Python version from --python=<system installation> on Unix (#18550)

Bug fixes

  • Delay computation of 'unbound' visibility for implicit instance attributes (#18669).
    This fixes a significant performance regression in version 0.0.1-alpha.9.

Typing semantics and features

  • Support the del statement; model implicit deletion of except handler names (#18593)

Release

  • Include ruff/ directory in release source tarballs (#617)

Contributors

Install ty 0.0.1-alpha.10

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.10/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.10/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.10

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.9

11 Jun 11:18
2feba5e

Choose a tag to compare

0.0.1-alpha.9 Pre-release
Pre-release

Release Notes

Typing semantics and features

  • Add generic inference for dataclasses (#18443)
  • Add support for global __debug__ constant (#18540)
  • Argument type expansion for overload call evaluation (#18382)
  • Exclude members starting with _abc_ from a protocol interface (#18467)
  • Infer list[T] for starred target in unpacking (#18401)
  • Infer list[T] when unpacking non-tuple type (#18438)
  • Support type annotation for legacy typing aliases for generic classes (#18404)
  • Allow using dataclasses.dataclass as a function (#18440)
  • Type narrowing for attribute/subscript assignments (#18041)

Diagnostics

  • Add hints to invalid-type-form for common mistakes (#18543)
  • Add subdiagnostic suggestion to unresolved-reference diagnostic when variable exists on self (#18444)
  • Track the origin of the environment.python setting for better error messages (#18483)

CLI

  • Fix --python argument for Windows, and improve error messages for bad --python arguments (#18457)

Bug fixes

  • Meta-type of type variables should be type[..] (#18439)
  • Only consider a type T a subtype of a protocol P if all of P's members are fully bound on T (#18466)
  • Fix false positives for legacy ParamSpecs inside Callable type expressions (#18426)
  • Fix panic when pulling types for UnaryOp expressions inside Literal slices (#18536)
  • Fix panic when trying to pull types for attribute expressions inside Literal type expressions (#18535)
  • Fix panic when trying to pull types for subscript expressions inside Callable type expressions (#18534)
  • Treat lambda functions as instances of types.FunctionType (#18431)
  • Implement disjointness between Callable and SpecialForm (#18503)

Server

  • Fix stale diagnostics in documents on Windows (#18544)
  • Add support for object.<CURSOR> completions (#18468)
  • Only provide declarations and bindings as completions (#18456)

Documentation

  • Add CONDA_PREFIX to --python documentation (#18574)
  • Update list of referenced environment variables (#612)
  • Document how the default value for python-version is determined (#18549)
  • Document the "all" option for python-platform (#18548)

Contributors

Install ty 0.0.1-alpha.9

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.9/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.9/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.9

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

0.0.1-alpha.8

02 Jun 11:49
c1337c9

Choose a tag to compare

0.0.1-alpha.8 Pre-release
Pre-release

Release Notes

Typing semantics and features

  • Add subtyping between Callable types and class literals with __init__ (#17638)
  • Implement implicit inheritance from Generic[] for PEP-695 generic classes (#18283)
  • Infer the Python version from the environment if feasible (#18057)
  • Support ephemeral uv virtual environments (#18335)
  • Model that some Callable types should have all FunctionType attributes available (#18242)

Diagnostics

  • Add diagnostic hints for a function that has a non-None return-type annotation but no return statements (#18359)
  • Add hint if async context manager is used in non-async with statement (#18299)
  • Improve diagnostics if the user attempts to import a stdlib module that does not exist on their configured Python version (#18403)
  • Tell the user why we inferred a certain Python version when reporting version-specific syntax errors (#18295)

Bug fixes

  • Fix multithreading related hangs and panics (#18238)
  • Ensure Literal types are considered assignable to anything their Instance supertypes are assignable to (#18351)
  • Callable types are disjoint from non-callable @final nominal instance types (#18368)
  • Support callability of bound/constrained typevars (#18389)

Server

  • Fix server hang after shutdown request (#18414)
  • Improve completions by leveraging scopes (#18281)
  • Support cancellation and retry in the server (#18273)
  • Support publishing diagnostics in the server (#18309)

CLI

  • Add --config-file CLI arg (#18083)

Contributors

Install ty 0.0.1-alpha.8

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.8/ty-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/astral-sh/ty/releases/download/0.0.1-alpha.8/ty-installer.ps1 | iex"

Download ty 0.0.1-alpha.8

File Platform Checksum
ty-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ty-x86_64-apple-darwin.tar.gz Intel macOS checksum
ty-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ty-i686-pc-windows-msvc.zip x86 Windows checksum
ty-x86_64-pc-windows-msvc.zip x64 Windows checksum
ty-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ty-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ty-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ty-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ty-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ty-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ty-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ty-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ty-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ty-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ty-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ty-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum