[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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17,17 +17,17 @@ import typing
from bar import Bar from bar import Bar
class Foo(Bar): class Foo(Bar):
def foo() -> str: def foo() -> object:
return "foo" return "foo"
@typing.override @typing.override
def bar() -> str: def bar() -> object:
return "foo_bar" return "foo_bar"
"#; "#;
static BAR_CODE: &str = r#" static BAR_CODE: &str = r#"
class Bar: class Bar:
def bar() -> str: def bar() -> object:
return "bar" return "bar"
def random(arg: int) -> int: def random(arg: int) -> int: