diff --git a/crates/ty_ide/src/all_symbols.rs b/crates/ty_ide/src/all_symbols.rs index 64cdfda9a4346..c5a5d946dc34b 100644 --- a/crates/ty_ide/src/all_symbols.rs +++ b/crates/ty_ide/src/all_symbols.rs @@ -652,7 +652,7 @@ def zqzqzq(): ) .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/__init__.py:2:27 | @@ -698,7 +698,7 @@ def zqzqzq(): ) .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/__init__.py:2:37 | @@ -743,7 +743,7 @@ def zqzqzq(): ) .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/__init__.py:2:5 | @@ -794,7 +794,7 @@ def zqzqzq(): ) .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/io/api.py:2:31 | @@ -857,7 +857,7 @@ __all__ = ['zqzqzq'] ) .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/__init__.py:2:5 | @@ -889,7 +889,7 @@ def zqzqzq(): .source("sub1/sub2/sub3.py", "from pandas import zqzqzq as zqzqzq") .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/__init__.py:2:5 | @@ -932,7 +932,7 @@ def zqzqzq(): .source("sub1/sub2/sub3.py", "from pandas import zqzqzq as zqzqzq") .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> pandas/__init__.py:2:5 | @@ -1042,7 +1042,7 @@ def test_helper_xyzxyzxyz(): // First-party test symbols should still be available // (both test_ prefixed and non-test_ prefixed) - assert_snapshot!(test.all_symbols("xyzxyzxyz"), @r" + assert_snapshot!(test.all_symbols("xyzxyzxyz"), @" info[all-symbols]: AllSymbolInfo --> mypackage/tests/test_utils.py:2:5 | @@ -1080,7 +1080,7 @@ def test_helper_xyzxyzxyz(): ) .build(); - assert_snapshot!(test.all_symbols("xyzxyzxyz"), @r" + assert_snapshot!(test.all_symbols("xyzxyzxyz"), @" info[all-symbols]: AllSymbolInfo --> site-packages/thirdparty/utils.py:1:5 | @@ -1114,7 +1114,7 @@ def test_helper_xyzxyzxyz(): .source("mypackage/_foo/__init__.py", "ZQZQZQ = 1") .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> mypackage/_foo/__init__.py:1:1 | @@ -1162,7 +1162,7 @@ def test_helper_xyzxyzxyz(): .site_packages("thirdparty/_foo/__init__.py", "ZQZQZQ = 1") .build(); - assert_snapshot!(test.all_symbols("zqzqzq"), @r" + assert_snapshot!(test.all_symbols("zqzqzq"), @" info[all-symbols]: AllSymbolInfo --> site-packages/thirdparty/__init__.py:1:1 | diff --git a/crates/ty_ide/src/completion.rs b/crates/ty_ide/src/completion.rs index f7b5f01f88393..cc9b8ca5b58dd 100644 --- a/crates/ty_ide/src/completion.rs +++ b/crates/ty_ide/src/completion.rs @@ -8492,42 +8492,42 @@ raise ); assert_snapshot!( builder.skip_auto_import().skip_builtins().build().snapshot(), - @r" - and - as - assert - async - await - break - case - class - continue - def - del - elif - else - except - finally - for - from - global - if - import - in - is - lambda - match - nonlocal - not - or - pass - raise - return - try - while - with - yield - ", + @" + and + as + assert + async + await + break + case + class + continue + def + del + elif + else + except + finally + for + from + global + if + import + in + is + lambda + match + nonlocal + not + or + pass + raise + return + try + while + with + yield + ", ); } diff --git a/crates/ty_ide/src/find_references.rs b/crates/ty_ide/src/find_references.rs index 960a3d724674c..21fb1376dcdd9 100644 --- a/crates/ty_ide/src/find_references.rs +++ b/crates/ty_ide/src/find_references.rs @@ -410,7 +410,7 @@ test("test") ) .build(); - assert_snapshot!(test.references(), @" + assert_snapshot!(test.references(), @r#" info[references]: Found 6 references --> lib.py:5:5 | @@ -433,10 +433,10 @@ test("test") 2 | from lib import test | ---- 3 | - 4 | test(\"test\") + 4 | test("test") | ---- | - "); + "#); } #[test] @@ -1242,7 +1242,7 @@ result = func(value=42) ) .build(); - assert_snapshot!(test.references(), @r#" + assert_snapshot!(test.references(), @" info[references]: Found 3 references --> main.py:4:15 | @@ -1258,7 +1258,7 @@ result = func(value=42) 3 | return value * 2 | ----- | - "#); + "); } #[test] @@ -1282,7 +1282,7 @@ async def main(): ) .build(); - assert_snapshot!(test.references(), @r#" + assert_snapshot!(test.references(), @" info[references]: Found 3 references --> main.py:5:23 | @@ -1297,7 +1297,7 @@ async def main(): 3 | return value * 2 | ----- | - "#); + "); } #[test] @@ -1321,7 +1321,7 @@ instance = ExampleClass(old_name="test") ) .build(); - assert_snapshot!(test.references(), @r#" + assert_snapshot!(test.references(), @" info[references]: Found 1 references --> example_rename_2.py:4:14 | @@ -1330,7 +1330,7 @@ instance = ExampleClass(old_name="test") 4 | self.old_name = old_name | -------- | - "#); + "); } #[test] @@ -1359,7 +1359,7 @@ result = func(value=10) // TODO(parameter-keyword-references): Nested callable owners are intentionally excluded by // the external-visibility heuristic (perf/signal tradeoff). // Ideal output would also include `caller.py` at `func(value=10)` on `value`. - assert_snapshot!(test.references(), @r#" + assert_snapshot!(test.references(), @" info[references]: Found 2 references --> outer.py:3:15 | @@ -1370,7 +1370,7 @@ result = func(value=10) | ----- 5 | return inner | - "#); + "); } #[test] diff --git a/crates/ty_ide/src/goto_declaration.rs b/crates/ty_ide/src/goto_declaration.rs index a1880f8fc7925..5495d471aba12 100644 --- a/crates/ty_ide/src/goto_declaration.rs +++ b/crates/ty_ide/src/goto_declaration.rs @@ -138,7 +138,7 @@ mod tests { ", ); - assert_snapshot!(test.goto_declaration(), @r" + assert_snapshot!(test.goto_declaration(), @" info[goto-declaration]: Go to declaration --> main.py:6:12 | diff --git a/crates/ty_ide/src/goto_definition.rs b/crates/ty_ide/src/goto_definition.rs index 01d296659aa0a..7b0e14c5283b5 100644 --- a/crates/ty_ide/src/goto_definition.rs +++ b/crates/ty_ide/src/goto_definition.rs @@ -427,7 +427,7 @@ class MyOtherClass: ) .build(); - assert_snapshot!(test.goto_definition(), @r" + assert_snapshot!(test.goto_definition(), @" info[goto-definition]: Go to definition --> main.py:3:5 | @@ -1663,7 +1663,7 @@ x = MyClass() ) .build(); - assert_snapshot!(test.goto_definition(), @r" + assert_snapshot!(test.goto_definition(), @" info[goto-definition]: Go to definition --> main.py:5:5 | @@ -1699,7 +1699,7 @@ x = MyClass() ) .build(); - assert_snapshot!(test.goto_definition(), @r" + assert_snapshot!(test.goto_definition(), @" info[goto-definition]: Go to definition --> main.py:5:5 | @@ -1761,7 +1761,7 @@ x = MyClass(foo) assert_snapshot!( test.goto_definition(), - @r" + @" info[goto-definition]: Go to definition --> main.py:7:13 | @@ -1799,7 +1799,7 @@ x = MyClass() ) .build(); - assert_snapshot!(test.goto_definition(), @r" + assert_snapshot!(test.goto_definition(), @" info[goto-definition]: Go to definition --> main.py:7:5 | @@ -2055,7 +2055,7 @@ p = Point(1, 2) ) .build(); - assert_snapshot!(test.goto_definition(), @r#" + assert_snapshot!(test.goto_definition(), @" info[goto-definition]: Go to definition --> main.py:4:5 | @@ -2074,7 +2074,7 @@ p = Point(1, 2) 263 | @property 264 | def __flags__(self) -> int: ... | - "#); + "); } /// Goto-definition performs lookups on the metaclass when attributes are not found. @@ -2093,7 +2093,7 @@ p = Point(1, 2) ) .build(); - assert_snapshot!(test.goto_definition(), @r#" + assert_snapshot!(test.goto_definition(), @" info[goto-definition]: Go to definition --> main.py:6:5 | @@ -2110,7 +2110,7 @@ p = Point(1, 2) 4 | 5 | class Bar(metaclass=Foo): ... | - "#); + "); } /// Goto-definition does not look up instance members on the metaclass. @@ -2129,7 +2129,7 @@ p = Point(1, 2) ) .build(); - assert_snapshot!(test.goto_definition(), @r#"No goto target found"#); + assert_snapshot!(test.goto_definition(), @"No goto target found"); } /// Check that we don't fall into infinite recursion when e.g. @@ -2141,7 +2141,7 @@ p = Point(1, 2) .source("main.py", "type.a") .build(); - assert_snapshot!(test.goto_definition(), @r#"No goto target found"#); + assert_snapshot!(test.goto_definition(), @"No goto target found"); } /// Check that we don't fall into infinite recursion when e.g. diff --git a/crates/ty_ide/src/hover.rs b/crates/ty_ide/src/hover.rs index 6f071a161f281..a448a7b2fc9c3 100644 --- a/crates/ty_ide/src/hover.rs +++ b/crates/ty_ide/src/hover.rs @@ -303,7 +303,7 @@ mod tests { "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" def my_func( a, b @@ -358,7 +358,7 @@ mod tests { "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" def my_func( a, b @@ -427,7 +427,7 @@ mod tests { "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" --------------------------------------------- This is such a great class!! @@ -489,7 +489,7 @@ mod tests { "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" --------------------------------------------- This is such a great class!! @@ -664,7 +664,7 @@ mod tests { "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" --------------------------------------------- This is such a great class!! @@ -729,7 +729,7 @@ mod tests { "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" bound method MyClass.my_method( a, b @@ -2045,7 +2045,7 @@ def ab(a: int, *, c: int): ) .unwrap(); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" --------------------------------------------- The cool lib_py module! @@ -2599,7 +2599,7 @@ def function(): ) .unwrap(); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" --------------------------------------------- The cool lib_py module! @@ -2999,7 +2999,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" int --------------------------------------------- This is the docs for this value @@ -3088,7 +3088,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" int --------------------------------------------- This is the docs for this value @@ -3128,7 +3128,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" str (Final) --------------------------------------------- ```python @@ -3158,7 +3158,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" Literal[1] (Final) --------------------------------------------- ```python @@ -3189,7 +3189,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" Literal[1] (Final) --------------------------------------------- ```python @@ -3222,7 +3222,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" int (ClassVar) --------------------------------------------- ```python @@ -3255,7 +3255,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" int (Final) --------------------------------------------- ```python @@ -4547,7 +4547,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" list[Unknown | int] --------------------------------------------- ```python @@ -4570,7 +4570,7 @@ def function(): "#, ); - assert_snapshot!(test.hover(), @r" + assert_snapshot!(test.hover(), @" list[int | str] --------------------------------------------- ```python diff --git a/crates/ty_ide/src/inlay_hints.rs b/crates/ty_ide/src/inlay_hints.rs index 7aebe4f2135e8..7e73b8e1b96bc 100644 --- a/crates/ty_ide/src/inlay_hints.rs +++ b/crates/ty_ide/src/inlay_hints.rs @@ -1281,7 +1281,7 @@ mod tests { ", ); - assert_snapshot!(test.inlay_hints(), @r#" + assert_snapshot!(test.inlay_hints(), @" def i(x: int, /) -> int: return x @@ -1289,7 +1289,7 @@ mod tests { _ = i(1) _ignored = i(1) __ignored = i(1) - "#); + "); } #[test] @@ -2598,6 +2598,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + a[: list[Unknown | int]] = [1, 2] b[: list[Unknown | int | float]] = [1.0, 2.0] c[: list[Unknown | bool]] = [True, False] @@ -3330,6 +3331,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + class MyClass: def __init__(self): self.x: int = 1 @@ -3496,6 +3498,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + class MyClass[T, U]: def __init__(self, x: list[T], y: tuple[U, U]): self.x[: list[T@MyClass]] = x @@ -4617,7 +4620,8 @@ mod tests { foo(val.y()[1])", ); - assert_snapshot!(test.inlay_hints(), @r" + assert_snapshot!(test.inlay_hints(), @" + from typing import List def foo(x: int): pass @@ -6456,7 +6460,7 @@ mod tests { // and since *names is variadic, no parameter name hints should be shown. // Before the fix, this incorrectly showed `name=` and `is_symmetric=` hints // from the first overload. - assert_snapshot!(test.inlay_hints(), @" + assert_snapshot!(test.inlay_hints(), @r#" from typing import overload, Optional, Sequence @@ -6476,7 +6480,7 @@ mod tests { 1564 | 1565 | class Sequence(Reversible[_T_co], Collection[_T_co]): | ^^^^^^^^ - 1566 | \"\"\"All the operations on a read-only sequence. + 1566 | """All the operations on a read-only sequence. | info: Source --> main2.py:11:5 @@ -6493,7 +6497,7 @@ mod tests { 914 | @disjoint_base 915 | class str(Sequence[str]): | ^^^ - 916 | \"\"\"str(object='') -> str + 916 | """str(object='') -> str 917 | str(bytes_or_buffer[, encoding[, errors]]) -> str | info: Source @@ -6519,7 +6523,7 @@ mod tests { pass b: Sequence[str] = S('x', 'y') - "); + "#); } #[test] @@ -6542,7 +6546,7 @@ mod tests { // Neither overload matches via type checking (list[Unknown] is neither int nor str), // so `matching_overloads()` returns empty. The arity-based fallback picks the first // overload (1 matched arg out of 1 required), and we should see the `x=` hint. - assert_snapshot!(test.inlay_hints(), @r" + assert_snapshot!(test.inlay_hints(), @" from typing import overload @@ -7444,6 +7448,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + from typing_extensions import TypeAliasType A = TypeAliasType([name=]'A', [value=]str) --------------------------------------------- @@ -7529,6 +7534,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + def f(xyxy: object): if isinstance(xyxy, list): x[: Top[list[Unknown]]] = xyxy @@ -7633,6 +7639,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + import foo a[: B[A[D[int, list[str | A[B[int]]]]]]] = foo.C().foo() @@ -7844,6 +7851,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + from foo import C a[: B[A[D[int, list[str | A[B[int]]]]]]] = C().foo() @@ -8050,7 +8058,8 @@ mod tests { ", ); - assert_snapshot!(test.inlay_hints(), @r" + assert_snapshot!(test.inlay_hints(), @" + from foo import D class Baz: ... @@ -8351,7 +8360,8 @@ mod tests { "#, ); - assert_snapshot!(test.inlay_hints(), @r" + assert_snapshot!(test.inlay_hints(), @" + from foo import foo a[: bar.A | baz.A] = foo() @@ -8442,6 +8452,7 @@ mod tests { ); assert_snapshot!(test.inlay_hints(), @r#" + from foo import foo from bar import B diff --git a/crates/ty_ide/src/rename.rs b/crates/ty_ide/src/rename.rs index 01c62c22991e0..e7ddbab2d38f0 100644 --- a/crates/ty_ide/src/rename.rs +++ b/crates/ty_ide/src/rename.rs @@ -1697,31 +1697,31 @@ result = func(10, y=20) // Includes all overload declarations plus implementation from usage-site rename. assert_snapshot!(test.rename("better_name"), @r#" - info[rename]: Rename symbol (found 6 locations) - --> main.py:2:17 - | - 2 | from lib import test - | ^^^^ - 3 | - 4 | test("test") - | ---- - | - ::: lib.py:5:5 - | - 4 | @overload - 5 | def test() -> None: ... - | ---- - 6 | @overload - 7 | def test(a: str) -> str: ... - | ---- - 8 | @overload - 9 | def test(a: int) -> int: ... - | ---- - 10 | - 11 | def test(a: Any) -> Any: - | ---- - 12 | return a - | + info[rename]: Rename symbol (found 6 locations) + --> main.py:2:17 + | + 2 | from lib import test + | ^^^^ + 3 | + 4 | test("test") + | ---- + | + ::: lib.py:5:5 + | + 4 | @overload + 5 | def test() -> None: ... + | ---- + 6 | @overload + 7 | def test(a: str) -> str: ... + | ---- + 8 | @overload + 9 | def test(a: int) -> int: ... + | ---- + 10 | + 11 | def test(a: Any) -> Any: + | ---- + 12 | return a + | "#); } @@ -2189,7 +2189,7 @@ result = func(10, y=20) // Only 2 locations should be found (the definition and the decorator reference), // not the second `my_func` function definition, because `my_func` is not a property. - assert_snapshot!(test.rename("better_name"), @r#" + assert_snapshot!(test.rename("better_name"), @" info[rename]: Rename symbol (found 2 locations) --> lib.py:8:5 | @@ -2204,7 +2204,7 @@ result = func(10, y=20) 12 | def my_func(): 13 | pass | - "#); + "); } /// When renaming the decorated function (not the one referenced in the decorator), @@ -2238,7 +2238,7 @@ result = func(10, y=20) // `Definition` from the second. The decorator should also be excluded since it // semantically refers to the first definition, but fixing this requires using // position-aware binding resolution in `definitions_for_name`. - assert_snapshot!(test.rename("better_name"), @r#" + assert_snapshot!(test.rename("better_name"), @" info[rename]: Rename symbol (found 2 locations) --> lib.py:11:2 | @@ -2250,7 +2250,7 @@ result = func(10, y=20) | ^^^^^^^ 13 | pass | - "#); + "); } /// A property with differently-named getter and setter should not link them @@ -2274,7 +2274,7 @@ result = func(10, y=20) .build(); // Only the getter should be renamed, not the setter (they have different names). - assert_snapshot!(test.rename("new_name"), @r" + assert_snapshot!(test.rename("new_name"), @" info[rename]: Rename symbol (found 2 locations) --> lib.py:4:9 | diff --git a/crates/ty_ide/src/symbols.rs b/crates/ty_ide/src/symbols.rs index c780933a70855..fd52c53735dff 100644 --- a/crates/ty_ide/src/symbols.rs +++ b/crates/ty_ide/src/symbols.rs @@ -2013,7 +2013,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" ZQZQZQ :: Constant :: Re-exported from `foo` __all__ :: Variable :: Re-exported from `foo` ", @@ -2129,7 +2129,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" __all__ :: Variable :: Re-exported from `foo` TRICKSY :: Constant ", @@ -2183,7 +2183,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" __all__ :: Variable :: Re-exported from `foo` defaultdict :: Variable :: Re-exported from `collections` ", @@ -2278,7 +2278,7 @@ class X: // `from foo import *` will try to import it anyway. insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" __all__ :: Variable :: Re-exported from `foo` TRICKSY :: Constant ", @@ -2397,7 +2397,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `foo` _ZYZYZY :: Constant ", @@ -2426,7 +2426,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `foo` _ZYZYZY :: Constant ", @@ -2455,7 +2455,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `foo` _ZYZYZY :: Constant ", @@ -2485,7 +2485,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `parent.foo` _ZYZYZY :: Constant ", @@ -2515,7 +2515,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `parent.foo` _ZYZYZY :: Constant ", @@ -2545,7 +2545,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `parent.foo` _ZYZYZY :: Constant ", @@ -2575,7 +2575,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `parent.foo` _ZYZYZY :: Constant ", @@ -2605,7 +2605,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZQZQZQ :: Constant :: Re-exported from `parent.foo` _ZYZYZY :: Constant ", @@ -2637,7 +2637,7 @@ class X: .build(); insta::assert_snapshot!( test.exports_for("a.py"), - @r" + @" _ZBZBZB :: Constant :: Re-exported from `b` _ZAZAZA :: Constant :: Re-exported from `b` ", @@ -2682,7 +2682,7 @@ class X: // `_ZBZBZB` instead of `_ZFZFZF`. insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZFZFZF :: Constant :: Re-exported from `foo` _ZYZYZY :: Constant ", @@ -2723,7 +2723,7 @@ class X: // answer should just be `_ZFZFZF` and `_ZYZYZY`. insta::assert_snapshot!( test.exports_for("test.py"), - @r" + @" _ZFZFZF :: Constant :: Re-exported from `parent.foo` foo :: Module :: Re-exported from `parent` _ZYZYZY :: Constant @@ -2765,7 +2765,7 @@ class X: // Ideally this would only have `ZQZQZQ`. insta::assert_snapshot!( test.exports(), - @r" + @" ZQZQZQ :: Constant ZYZYZY :: Constant ", @@ -2798,7 +2798,7 @@ class X: // Ideally this would only have `ZYZYZY`. insta::assert_snapshot!( test.exports(), - @r" + @" ZQZQZQ :: Constant ZYZYZY :: Constant ", diff --git a/crates/ty_project/src/fixes.rs b/crates/ty_project/src/fixes.rs index d9fbccf93af43..4083345d4ef73 100644 --- a/crates/ty_project/src/fixes.rs +++ b/crates/ty_project/src/fixes.rs @@ -421,7 +421,7 @@ mod tests { suppress_all_in(r#" a = b + 10"# ), - @r" + @" Added 1 suppressions ## Fixed source @@ -438,7 +438,7 @@ mod tests { suppress_all_in(r#" a = b + 10 + c"# ), - @r" + @" Added 2 suppressions ## Fixed source @@ -456,7 +456,7 @@ mod tests { import sys a = b + 10 + sys.veeersion"# ), - @r" + @" Added 2 suppressions ## Fixed source @@ -475,7 +475,7 @@ mod tests { import sys a = 5 + 10 # ty: ignore[unresolved-reference]"# ), - @r" + @" Added 0 suppressions ## Fixed source @@ -506,7 +506,7 @@ mod tests { a = x + "# ), - @r" + @" Added 0 suppressions ## Fixed source diff --git "a/crates/ty_python_semantic/resources/mdtest/snapshots/assignment_diagnosti\342\200\246_-_Subscript_assignment\342\200\246_-_Unknown_key_for_all_\342\200\246_(8a0f0e8ceccc51b2).snap" "b/crates/ty_python_semantic/resources/mdtest/snapshots/assignment_diagnosti\342\200\246_-_Subscript_assignment\342\200\246_-_Unknown_key_for_all_\342\200\246_(8a0f0e8ceccc51b2).snap" index af0724207b0d6..d6cbe425e73b5 100644 --- "a/crates/ty_python_semantic/resources/mdtest/snapshots/assignment_diagnosti\342\200\246_-_Subscript_assignment\342\200\246_-_Unknown_key_for_all_\342\200\246_(8a0f0e8ceccc51b2).snap" +++ "b/crates/ty_python_semantic/resources/mdtest/snapshots/assignment_diagnosti\342\200\246_-_Subscript_assignment\342\200\246_-_Unknown_key_for_all_\342\200\246_(8a0f0e8ceccc51b2).snap" @@ -1,6 +1,5 @@ --- source: crates/ty_test/src/lib.rs -assertion_line: 623 expression: snapshot --- diff --git a/crates/ty_python_semantic/resources/mdtest/snapshots/typed_dict.md_-_`TypedDict`_-_Diagnostics_(e5289abf5c570c29).snap b/crates/ty_python_semantic/resources/mdtest/snapshots/typed_dict.md_-_`TypedDict`_-_Diagnostics_(e5289abf5c570c29).snap index 4f32134a4aee6..2771bb220a113 100644 --- a/crates/ty_python_semantic/resources/mdtest/snapshots/typed_dict.md_-_`TypedDict`_-_Diagnostics_(e5289abf5c570c29).snap +++ b/crates/ty_python_semantic/resources/mdtest/snapshots/typed_dict.md_-_`TypedDict`_-_Diagnostics_(e5289abf5c570c29).snap @@ -1,6 +1,5 @@ --- source: crates/ty_test/src/lib.rs -assertion_line: 623 expression: snapshot ---