Skip to content

Commit 577de6c

Browse files
authored
[red-knot] Clarify a TODO comment in a sys.version_info test (#14340)
1 parent d8b1afb commit 577de6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/red_knot_python_semantic/resources/mdtest/sys_version_info.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ import sys
5252
reveal_type(sys.version_info >= (3, 8, 1)) # revealed: bool
5353
reveal_type(sys.version_info >= (3, 8, 1, "final", 0)) # revealed: bool
5454

55-
# TODO: this is an invalid comparison (`sys.version_info` is a tuple of length 5)
56-
# Should we issue a diagnostic here?
55+
# TODO: While this won't fail at runtime, the user has probably made a mistake
56+
# if they're comparing a tuple of length >5 with `sys.version_info`
57+
# (`sys.version_info` is a tuple of length 5). It might be worth
58+
# emitting a lint diagnostic of some kind warning them about the probable error?
5759
reveal_type(sys.version_info >= (3, 8, 1, "final", 0, 5)) # revealed: bool
5860

5961
# TODO: this should be `Literal[False]`; see #14279

0 commit comments

Comments
 (0)