From fa5b19d4b653ffd3ae35e4df92ff252ea33db83c Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Thu, 18 Jul 2024 14:04:33 -0700 Subject: [PATCH] [red-knot] use a simpler builtin in the benchmark (#12393) In preparation for supporting resolving builtins, simplify the benchmark so it doesn't look up `str`, which is actually a complex builtin to deal with because it inherits `Sequence[str]`. Co-authored-by: Alex Waygood --- crates/ruff_benchmark/benches/red_knot.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ruff_benchmark/benches/red_knot.rs b/crates/ruff_benchmark/benches/red_knot.rs index 9b661b8e9c..331b33f227 100644 --- a/crates/ruff_benchmark/benches/red_knot.rs +++ b/crates/ruff_benchmark/benches/red_knot.rs @@ -17,17 +17,17 @@ import typing from bar import Bar class Foo(Bar): - def foo() -> str: + def foo() -> object: return "foo" @typing.override - def bar() -> str: + def bar() -> object: return "foo_bar" "#; static BAR_CODE: &str = r#" class Bar: - def bar() -> str: + def bar() -> object: return "bar" def random(arg: int) -> int: