From 9c4278da4ed6436d2dd9045becee9fc2c7447bee Mon Sep 17 00:00:00 2001 From: David Peter Date: Wed, 22 Oct 2025 14:41:46 +0200 Subject: [PATCH] Fix tests --- crates/ruff_benchmark/benches/ty_walltime.rs | 2 +- crates/ty_ide/src/completion.rs | 3 +++ crates/ty_ide/src/semantic_tokens.rs | 4 ++-- crates/ty_python_semantic/resources/mdtest/class/super.md | 2 +- python/py-fuzzer/fuzz.py | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/ruff_benchmark/benches/ty_walltime.rs b/crates/ruff_benchmark/benches/ty_walltime.rs index 48fd7f4753..be6195d96a 100644 --- a/crates/ruff_benchmark/benches/ty_walltime.rs +++ b/crates/ruff_benchmark/benches/ty_walltime.rs @@ -226,7 +226,7 @@ static STATIC_FRAME: Benchmark = Benchmark::new( max_dep_date: "2025-08-09", python_version: PythonVersion::PY311, }, - 630, + 750, ); #[track_caller] diff --git a/crates/ty_ide/src/completion.rs b/crates/ty_ide/src/completion.rs index 2e4e0e9c15..feb4e45fc6 100644 --- a/crates/ty_ide/src/completion.rs +++ b/crates/ty_ide/src/completion.rs @@ -1958,6 +1958,9 @@ class Quux: ); assert_snapshot!(test.completions_without_builtins(), @r" + bar + baz + foo __annotations__ __class__ __delattr__ diff --git a/crates/ty_ide/src/semantic_tokens.rs b/crates/ty_ide/src/semantic_tokens.rs index 07bfa8f7a1..4e66881f48 100644 --- a/crates/ty_ide/src/semantic_tokens.rs +++ b/crates/ty_ide/src/semantic_tokens.rs @@ -1798,11 +1798,11 @@ class BoundedContainer[T: int, U = str]: "T" @ 554..555: TypeParameter "value2" @ 557..563: Parameter "U" @ 565..566: TypeParameter - "self" @ 577..581: Variable + "self" @ 577..581: TypeParameter "value1" @ 582..588: Variable "T" @ 590..591: TypeParameter "value1" @ 594..600: Parameter - "self" @ 609..613: Variable + "self" @ 609..613: TypeParameter "value2" @ 614..620: Variable "U" @ 622..623: TypeParameter "value2" @ 626..632: Parameter diff --git a/crates/ty_python_semantic/resources/mdtest/class/super.md b/crates/ty_python_semantic/resources/mdtest/class/super.md index ee37d1415a..d08c5777c1 100644 --- a/crates/ty_python_semantic/resources/mdtest/class/super.md +++ b/crates/ty_python_semantic/resources/mdtest/class/super.md @@ -615,7 +615,7 @@ class A: class B(A): def __init__(self, a: int): super().__init__(a) - # error: [unresolved-attribute] "Type `, B>` has no attribute `a`" + # error: [unresolved-attribute] "Object of type `, B>` has no attribute `a`" super().a # error: [unresolved-attribute] "Object of type `, B>` has no attribute `a`" diff --git a/python/py-fuzzer/fuzz.py b/python/py-fuzzer/fuzz.py index 76cc52d2a1..e113d7e179 100644 --- a/python/py-fuzzer/fuzz.py +++ b/python/py-fuzzer/fuzz.py @@ -139,7 +139,7 @@ class FuzzResult: case Executable.TY: panic_message = f"The following code triggers a {new}ty panic:" case _ as unreachable: - assert_never(unreachable) # ty: ignore[type-assertion-failure] + assert_never(unreachable) print(colored(panic_message, "red")) print()