[ty] Minor fixes to Protocol tests (#20347)

This commit is contained in:
Alex Waygood
2025-09-11 15:42:13 +01:00
committed by GitHub
parent ffd4340dce
commit 0e3697a643
4 changed files with 25 additions and 6 deletions

View File

@@ -260,7 +260,7 @@ class SecondRequiredArgument:
def __len__(self, v: int) -> Literal[1]:
return 1
# TODO: Emit a diagnostic
# this is fine: the call succeeds at runtime since the second argument is optional
reveal_type(len(SecondOptionalArgument())) # revealed: Literal[0]
# TODO: Emit a diagnostic