-
Notifications
You must be signed in to change notification settings - Fork 219
Open
Milestone
Description
On current main on my machine:
$ cargo test --test mdtest pep695/functions
...
functions.md - Generic functions: P… - Passing generic func… (b4125f59fbea016e)
crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md:529 unmatched assertion: revealed: Literal[1]
crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md:529 unexpected error: 13 [revealed-type] "Revealed type: `Unknown`"
However, this failure doesn't appear on main in CI. I've bisected it to astral-sh/ruff#23374, and I can repro it by isolating the pep695/functions.md change from that PR:
$ git checkout 6e9cf63e0f6ef8b466a1a3ab72eb1b0a6f09912a^
$ cargo test --test mdtest pep695/functions
[... clean ...]
$ git checkout 6e9cf63e0f6ef8b466a1a3ab72eb1b0a6f09912a crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md
$ cargo test --test mdtest pep695/functions
[... fail ...]
That change is:
diff --git i/crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md w/crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md
index 2f0926066e..70197b91af 100644
--- i/crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md
+++ w/crates/ty_python_semantic/resources/mdtest/generics/pep695/functions.md
@@ -74,7 +74,10 @@ S = TypeVar("S")
class CanIndex(Protocol[S]):
def __getitem__(self, index: int, /) -> S: ...
-class ExplicitlyImplements[T](CanIndex[T]): ...
+class ExplicitlyImplements[T](CanIndex[T]):
+ def __getitem__(self, index: int, /) -> T:
+ raise NotImplementedError
+
class SubProtocol[T](CanIndex[T], Protocol): ...
def takes_in_list[T](x: list[T]) -> list[T]:That change is on line 77, in a different markdown section from the test failure on line 529, so it's implausible to me that it could be directly responsible for the failure. Apart from nor repro'ing in CI, it also doesn't repro on @AlexWaygood's (Mac) machine. So is this...Arch Linux specific nondeterminism? I don't have a good theory yet.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels