Skip to content

⬆️ Update dependency ty to v0.0.33#1464

Merged
liudger merged 2 commits intomainfrom
renovate/ty-0.x
Apr 29, 2026
Merged

⬆️ Update dependency ty to v0.0.33#1464
liudger merged 2 commits intomainfrom
renovate/ty-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Apr 29, 2026

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ty (changelog) ==0.0.32==0.0.33 age adoption passing confidence

Release Notes

astral-sh/ty (ty)

v0.0.33

Compare Source

Released on 2026-04-28.

Breaking changes
  • ty now prefers the declared type of an annotated assignment in more situations (#​24802).
    Consider this example:

    from some_library import untyped_function
    
    threshold: int | None = 0
    result: str = untyped_function()

    ty previously favored the inferred type of the right hand side expression when threshold and result were used. This is useful for threshold, as it allows something like threshold += 1 to work without an error: we know that threshold could later become None, but right now, we see that it is an int. However, for result, the inferred type is Unknown. This is not a useful type and it can lead to false negatives. Starting with this release, ty will therefore prefer
    the declared type if the inferred and declared types are mutually assignable. In the above example, threshold will still be inferred as int (or rather Literal[1]), but result will now be inferred as str. If you previously added casts to work around this behavior, you should be able to remove them after upgrading.

Bug fixes
  • Fix reporting of annotation-only locals as unused (#​24811)
  • Fix project and workspace selection (#​24824)
  • Fix go-to definition for generic classes (#​24714)
  • Fix receiver coloring for aliased decorators (#​24884)
LSP server
  • Add support for go-to definition in literal enum member inlay hints (#​24792)
  • Add support for "baking" keyword argument inlay hints into the source code (#​24667)
  • Don't allow inlay hint edits when introducing a non global scope symbol (#​24797)
  • Omit semantic highlighting for unresolved symbols (#​24718)
Core type checking
  • Support narrowing with aliased conditional expressions (#​24302)
  • Model short-circuiting control flow in Boolean expressions (#​24458)
  • Handle finally blocks where all try/except blocks are terminal (#​24882)
  • Detect invalid ClassVar vs instance-attribute overrides (#​24767)
  • Emit diagnostic for invalid uses of Unpack[...] (#​24868)
  • Infer lambda parameter types with Callable type context (#​24317)
  • Support ** unpacking of TypedDict in dict-literal assignments (#​24703)
  • Support Unpack[TypedDict] in **kwargs signatures (#​24653)
  • Treat [*xs] as an irrefutable pattern when matching on Sequence (#​24787)
  • Improve generics solving for unions in invariant positions (#​24698)
  • Improve generics solving for unions when matching against protocols (#​24837)
Diagnostics
  • Add error context to invalid-return-type diagnostics, invalid-yield diagnostics, attribute assignment diagnostics (#​24770, #​24771)
  • Add error context for invalid TypedDict assignments (#​24790)
  • Add error context for invalid intersection type assignments (#​24772)
  • Improve TypedDict to dict assignment error diagnostics (#​24768)
  • Add contextual secondary annotations in more places (#​24696)
  • Include full type in invalid-key diagnostics for unions of TypedDicts (#​24693)
  • Emit more specific diagnostics for "possibly unbound" errors from context manager dunder methods invoked on a union. (#​24662)
  • Remove duplicate invalid-type-form diagnostics for PEP-613 type alias values (#​24760)
  • Improve diagnostics for implicit calls to a possibly unbound unary operator (#​24816)
  • Improve diagnostics for possibly-unbound errors from implicit dunder calls on unions (#​24676)
Performance
  • Optimize signature checking based on number of arguments (#​24674)
  • Defer union of parameter types (#​24756)
  • Skip checks for gradual vararg calls (#​24748)
Other changes
  • Fix notifications about watched changes for entities outside any workspace (#​24775)
Contributors

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • "before 2am"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot. labels Apr 29, 2026
github-actions[bot]
github-actions Bot previously approved these changes Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.89%. Comparing base (4f2d030) to head (a91b291).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1464   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files           6        6           
  Lines         997      997           
  Branches      135      135           
=======================================
  Hits          996      996           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the development dependency pin for the ty type checker to pick up the latest release.

Changes:

  • Bump ty in the dev dependency group from 0.0.32 to 0.0.33.

@liudger
Copy link
Copy Markdown
Owner

liudger commented Apr 29, 2026

@copilot Can you check the errors in the actions. Create a branch with the fixes for ty.

…tityInfo

ty v0.0.33 improved pydantic model analysis and now correctly infers
__init__ signatures. With alias=, the __init__ only accepts the alias
parameter name (e.g. dataType), even when populate_by_name=True is set.

Switching to validation_alias= keeps dataType accepted for JSON parsing
while exposing the Python field name data_type as the __init__ parameter,
which satisfies both ty's type checking and the existing tests.

Agent-Logs-Url: https://github.com/liudger/python-bsblan/sessions/42f382e1-fe63-4644-8d29-ae0689a1c1b0

Co-authored-by: liudger <4112111+liudger@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 29, 2026

@copilot Can you check the errors in the actions. Create a branch with the fixes for ty.

Fixed in commit a91b291.

ty v0.0.33 improved pydantic model analysis and now correctly infers __init__ signatures. With alias=, it only accepts the alias name (dataType) as a valid __init__ parameter — even when populate_by_name=True is set — causing unknown-argument: data_type errors in the tests.

Changed data_type, data_type_name, and data_type_family fields in EntityInfo from Field(alias=...) to Field(validation_alias=...). The JSON parsing still accepts dataType from BSB-LAN API responses, while data_type is recognized as the valid Python __init__ parameter by ty.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested a review from liudger April 29, 2026 15:16
@sonarqubecloud
Copy link
Copy Markdown

@liudger liudger merged commit 73cc783 into main Apr 29, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Upgrade or downgrade of project dependencies. no-stale This issue or PR is exempted from the stable bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants