[ty] Fix small test typo (#20220)

Small typo in the comment of a test

Co-authored-by: Samuel Rigaud <rigaud@gmail.com>
This commit is contained in:
Samuel Rigaud
2025-09-03 18:24:17 -04:00
committed by GitHub
parent 77b2cee223
commit 1e34f3f20a

View File

@@ -115,7 +115,7 @@ from typing import Literal
def test(x: Literal["a", "b", "c"] | None | int = None):
if x not in ("a", "c"):
# int is included because custom __eq__ methods could make
# an int equal to "a" or "b", so we can't eliminate it
# an int equal to "a" or "c", so we can't eliminate it
reveal_type(x) # revealed: Literal["b"] | None | int
else:
reveal_type(x) # revealed: Literal["a", "c"] | int