Skip to content

[ty] Fix panic for unclosed string literal in type annotation position#21592

Merged
MichaReiser merged 1 commit intomainfrom
micha/fix-overflow-closer-len
Nov 23, 2025
Merged

[ty] Fix panic for unclosed string literal in type annotation position#21592
MichaReiser merged 1 commit intomainfrom
micha/fix-overflow-closer-len

Conversation

@MichaReiser
Copy link
Member

Summary

Fixes astral-sh/ty#1611

Test Plan

Added test

@MichaReiser MichaReiser added bug Something isn't working ty Multi-file analysis & type inference labels Nov 23, 2025
@MichaReiser MichaReiser added bug Something isn't working ty Multi-file analysis & type inference labels Nov 23, 2025
@MichaReiser MichaReiser force-pushed the micha/fix-overflow-closer-len branch 2 times, most recently from fba2cb0 to 5fe473f Compare November 23, 2025 11:58
@astral-sh-bot
Copy link

astral-sh-bot bot commented Nov 23, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser force-pushed the micha/fix-overflow-closer-len branch from 5fe473f to 3b08759 Compare November 23, 2025 15:17
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice fix!

@MichaReiser
Copy link
Member Author

Nice fix!

Thanks to your foresight for adding this method in the first place!

@MichaReiser MichaReiser merged commit aec225d into main Nov 23, 2025
38 checks passed
@MichaReiser MichaReiser deleted the micha/fix-overflow-closer-len branch November 23, 2025 15:52
dcreager added a commit that referenced this pull request Nov 24, 2025
* origin/main: (27 commits)
  [ty] Add hint about resolved Python version when a user attempts to import a member added on a newer version (#21615)
  Use release commit for actions/checkout (#21610)
  [ty] Add failing mdtest for known `Protocol` panic (#21594)
  [`parser`] Fix panic when parsing IPython escape command expressions (#21480)
  Fix cargo shear in CI (#21609)
  Update actions/checkout digest to c2d88d3 (#21601)
  Update dependency ruff to v0.14.6 (#21603)
  Update astral-sh/setup-uv action to v7.1.4 (#21602)
  Update Rust crate clap to v4.5.53 (#21604)
  Update taiki-e/install-action action to v2.62.56 (#21608)
  Update Rust crate hashbrown to v0.16.1 (#21605)
  Update Rust crate indexmap to v2.12.1 (#21606)
  Update Rust crate syn to v2.0.111 (#21607)
  [ty] Check method definitions on subclasses for Liskov violations (#21436)
  [ty] Fix panic for unclosed string literal in type annotation position (#21592)
  [ty] Fix rendering of unused suppression diagnostic (#21580)
  [ty] Improve lsp handling of hover/goto on imports (#21572)
  [ty] Improve diagnostics when a submodule is not available as an attribute on a module-literal type (#21561)
  [ty] Improve concise diagnostics for invalid exceptions when a user catches a tuple of objects (#21578)
  [ty] upgrade salsa (#21575)
  ...
dcreager added a commit that referenced this pull request Nov 24, 2025
…d-typevar

* origin/main: (30 commits)
  [ty] Double click to insert inlay hint (#21600)
  [ty] Switch the error code from `unresolved-attribute` to `possibly-missing-attribute` for submodules that may not be available (#21618)
  [ty] Substitute for `typing.Self` when checking protocol members (#21569)
  [ty] Don't suggest things that aren't subclasses of `BaseException` after `raise`
  [ty] Add hint about resolved Python version when a user attempts to import a member added on a newer version (#21615)
  Use release commit for actions/checkout (#21610)
  [ty] Add failing mdtest for known `Protocol` panic (#21594)
  [`parser`] Fix panic when parsing IPython escape command expressions (#21480)
  Fix cargo shear in CI (#21609)
  Update actions/checkout digest to c2d88d3 (#21601)
  Update dependency ruff to v0.14.6 (#21603)
  Update astral-sh/setup-uv action to v7.1.4 (#21602)
  Update Rust crate clap to v4.5.53 (#21604)
  Update taiki-e/install-action action to v2.62.56 (#21608)
  Update Rust crate hashbrown to v0.16.1 (#21605)
  Update Rust crate indexmap to v2.12.1 (#21606)
  Update Rust crate syn to v2.0.111 (#21607)
  [ty] Check method definitions on subclasses for Liskov violations (#21436)
  [ty] Fix panic for unclosed string literal in type annotation position (#21592)
  [ty] Fix rendering of unused suppression diagnostic (#21580)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: assertion failed: start.raw <= end.raw with unclosed forward reference

2 participants

Comments