mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:04 +00:00
![]() ## Summary fixes astral-sh/ty#366 ## Test Plan * Added panic corpus regression tests * I also wrote a hover regression test (see below), but decided not to include it. The corpus tests are much more "effective" at finding these types of errors, since they exhaustively check all expressions for types. <details> ```rs #[test] fn hover_regression_test_366() { let test = cursor_test( r#" from ty_extensions import Intersection class A: ... class B: ... def _(x: Intersection[A,<CURSOR> B]): pass "#, ); assert_snapshot!(test.hover(), @r" A & B --------------------------------------------- ```text A & B ``` --------------------------------------------- info[hover]: Hovered content is --> main.py:7:31 | 5 | class B: ... 6 | 7 | def _(x: Intersection[A, B]): | ^^-^ | | | | | Cursor offset | source 8 | pass | "); } ``` </details> |
||
---|---|---|
.. | ||
resources/test/corpus | ||
src | ||
tests | ||
Cargo.toml |