[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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ from typing import Literal
def test(x: Literal["a", "b", "c"] | None | int = None): def test(x: Literal["a", "b", "c"] | None | int = None):
if x not in ("a", "c"): if x not in ("a", "c"):
# int is included because custom __eq__ methods could make # 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 reveal_type(x) # revealed: Literal["b"] | None | int
else: else:
reveal_type(x) # revealed: Literal["a", "c"] | int reveal_type(x) # revealed: Literal["a", "c"] | int