Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/red_knot_python_semantic/resources/mdtest/type_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def negate(n1: Not[int], n2: Not[Not[int]], n3: Not[Not[Not[int]]]) -> None:
n: Not[int, str]

def static_truthiness(not_one: Not[Literal[1]]) -> None:
# these are both boolean-literal types,
# since all possible runtime objects that are created by the literal syntax `1`
# TODO: `bool` is not incorrect, but these would ideally be `Literal[True]` and `Literal[False]`
# respectively, since all possible runtime objects that are created by the literal syntax `1`
# are members of the type `Literal[1]`
reveal_type(not_one is not 1) # revealed: bool
reveal_type(not_one is 1) # revealed: bool
Expand Down