Skip to content
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
Adjust the testNarrowingOptionalEqualsNone test case.
A recent change that I just merged seems to interact positively with this PR: increase in consistency when narrowing away `None`.
  • Loading branch information
tyralla committed May 23, 2025
commit 78dbff220e6a2b154110fc882a8abe4f57bf96fb
4 changes: 2 additions & 2 deletions test-data/unit/check-narrowing.test
Original file line number Diff line number Diff line change
Expand Up @@ -1375,9 +1375,9 @@ else:
if val in (None,):
reveal_type(val) # N: Revealed type is "Union[__main__.A, None]"
else:
reveal_type(val) # N: Revealed type is "Union[__main__.A, None]"
reveal_type(val) # N: Revealed type is "__main__.A"
if val not in (None,):
reveal_type(val) # N: Revealed type is "Union[__main__.A, None]"
reveal_type(val) # N: Revealed type is "__main__.A"
else:
reveal_type(val) # N: Revealed type is "Union[__main__.A, None]"
[builtins fixtures/primitives.pyi]
Expand Down
Loading