Skip to content

Commit

Permalink
[red-knot] use a simpler builtin in the benchmark (astral-sh#12393)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
carljm and AlexWaygood authored Jul 18, 2024
1 parent 181e7b3 commit fa5b19d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/ruff_benchmark/benches/red_knot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fa5b19d

Please sign in to comment.