mirror of https://github.com/astral-sh/ruff
Fix tests
This commit is contained in:
parent
195669f33d
commit
9c4278da4e
|
|
@ -226,7 +226,7 @@ static STATIC_FRAME: Benchmark = Benchmark::new(
|
||||||
max_dep_date: "2025-08-09",
|
max_dep_date: "2025-08-09",
|
||||||
python_version: PythonVersion::PY311,
|
python_version: PythonVersion::PY311,
|
||||||
},
|
},
|
||||||
630,
|
750,
|
||||||
);
|
);
|
||||||
|
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
|
|
|
||||||
|
|
@ -1958,6 +1958,9 @@ class Quux:
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_snapshot!(test.completions_without_builtins(), @r"
|
assert_snapshot!(test.completions_without_builtins(), @r"
|
||||||
|
bar
|
||||||
|
baz
|
||||||
|
foo
|
||||||
__annotations__
|
__annotations__
|
||||||
__class__
|
__class__
|
||||||
__delattr__
|
__delattr__
|
||||||
|
|
|
||||||
|
|
@ -1798,11 +1798,11 @@ class BoundedContainer[T: int, U = str]:
|
||||||
"T" @ 554..555: TypeParameter
|
"T" @ 554..555: TypeParameter
|
||||||
"value2" @ 557..563: Parameter
|
"value2" @ 557..563: Parameter
|
||||||
"U" @ 565..566: TypeParameter
|
"U" @ 565..566: TypeParameter
|
||||||
"self" @ 577..581: Variable
|
"self" @ 577..581: TypeParameter
|
||||||
"value1" @ 582..588: Variable
|
"value1" @ 582..588: Variable
|
||||||
"T" @ 590..591: TypeParameter
|
"T" @ 590..591: TypeParameter
|
||||||
"value1" @ 594..600: Parameter
|
"value1" @ 594..600: Parameter
|
||||||
"self" @ 609..613: Variable
|
"self" @ 609..613: TypeParameter
|
||||||
"value2" @ 614..620: Variable
|
"value2" @ 614..620: Variable
|
||||||
"U" @ 622..623: TypeParameter
|
"U" @ 622..623: TypeParameter
|
||||||
"value2" @ 626..632: Parameter
|
"value2" @ 626..632: Parameter
|
||||||
|
|
|
||||||
|
|
@ -615,7 +615,7 @@ class A:
|
||||||
class B(A):
|
class B(A):
|
||||||
def __init__(self, a: int):
|
def __init__(self, a: int):
|
||||||
super().__init__(a)
|
super().__init__(a)
|
||||||
# error: [unresolved-attribute] "Type `<super: <class 'B'>, B>` has no attribute `a`"
|
# error: [unresolved-attribute] "Object of type `<super: <class 'B'>, B>` has no attribute `a`"
|
||||||
super().a
|
super().a
|
||||||
|
|
||||||
# error: [unresolved-attribute] "Object of type `<super: <class 'B'>, B>` has no attribute `a`"
|
# error: [unresolved-attribute] "Object of type `<super: <class 'B'>, B>` has no attribute `a`"
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ class FuzzResult:
|
||||||
case Executable.TY:
|
case Executable.TY:
|
||||||
panic_message = f"The following code triggers a {new}ty panic:"
|
panic_message = f"The following code triggers a {new}ty panic:"
|
||||||
case _ as unreachable:
|
case _ as unreachable:
|
||||||
assert_never(unreachable) # ty: ignore[type-assertion-failure]
|
assert_never(unreachable)
|
||||||
|
|
||||||
print(colored(panic_message, "red"))
|
print(colored(panic_message, "red"))
|
||||||
print()
|
print()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue