[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 <alex.waygood@gmail.com>
This commit is contained in:
Carl Meyer
2024-07-18 14:04:33 -07:00
committed by GitHub
parent 181e7b3c0d
commit fa5b19d4b6

View File

@@ -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: