What to know

  • The release baseline stores individual existing diagnostics rather than exempting a whole file.
  • Its example keeps an old finding suppressed while reporting a new error in that same file.
  • Review baseline changes alongside code changes before describing a passing check as a repair.

ty 1.0's new migration baseline can make a type-checking run pass while previously identified errors remain in the code. That is the point of the feature: a team can block newly introduced diagnostics without requiring an entire existing codebase to be repaired before adopting the checker.

The release makes the difference visible in one file

Astral's December 1 release announcement demonstrates a function annotated to return an integer that instead returns a string. After the existing diagnostic is saved in a baseline, the example's next check passes. When another type error is added in the same file, the new error is reported.

The important unit is the individual diagnostic, rather than a blanket exemption for that file. This distinction gives maintainers a way to separate an inherited defect from a newly introduced one. It also means a passing result needs an accurate description: the configured check accepted the current diagnostic difference; it did not demonstrate that the earlier return-type mismatch was fixed.

A baseline change can explain a green result without a code repair

The announcement presents two migration paths: inserting suppression comments or storing existing findings in a separate committed baseline file. Its baseline example is specifically about bringing an existing project under checking while working through old findings over time.

In a code review, that creates a concrete question about the proposed change. Did the implementation remove a diagnostic, or did the accepted baseline grow? Both can alter what CI reports, but they represent different work. A migration proposal that intentionally accepts existing findings should identify that choice so another maintainer can distinguish an adoption step from a defect repair.

For example, imagine a pull request that changes an invoice calculation and updates the baseline in the same patch. This is an illustrative review scenario, not an observed bug. The reviewer should inspect whether a newly accepted diagnostic concerns the changed calculation. The presence of a successful check cannot resolve that question without looking at the baseline difference.

Keep the tool's adoption decision specific

Astral describes ty as a Python type checker and language server and recommends the 1.0 release for production use. That is the developer's release position, not evidence that a particular repository has migrated successfully. A team's own decision depends on the diagnostics it observes, which findings it accepts temporarily and who is responsible for addressing them.

The useful initial report is therefore more precise than a green badge: it can state that the new checker ran with an accepted set of existing diagnostics and that new findings remain visible. A shrinking baseline can then reflect deliberate repair, while a changed baseline receives review in its own right. The article does not prescribe a universal acceptable number of existing errors.

BijliCoin has not installed ty, run the illustrated example or measured its performance. No vendor speed comparison is used here. This explanation follows the dated release's documented baseline behavior; it should be revisited if matching rules, baseline update behavior or migration guidance changes.

Editorial note: AI-assisted research and writing based on the linked primary sources, with independent automated source, content and image checks. The cover is an AI-generated editorial illustration for BijliCoin. BijliCoin is responsible for this article and welcomes corrections through its corrections page. Testing and evidence limitations are stated in the article.

Sources & context

  1. Astral announces ty1.0 ↗

See our editorial policy or report a correction.

Related guides and definitions

Worth sharing?
Facebook ↗X ↗WhatsApp ↗LinkedIn ↗Telegram ↗Reddit ↗Email ↗

Sign in to like this article or add a comment. Comments are reviewed before appearing publicly.

Comments —