Skip to content

Commit

Permalink
fix tests for new narrowing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Jun 30, 2024
1 parent a8b696d commit 43d9ac5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __bool__(self) -> Literal[False]:

def func7(x: NoneProto | None):
if x is None:
reveal_type(x, expected_text="None")
reveal_type(x, expected_text="Never") # should be None. see https://github.com/DetachHead/basedpyright/issues/459
else:
reveal_type(x, expected_text="NoneProto")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ def func1(
if isinstance(obj, Callable):
reveal_type(obj, expected_text="((int, str) -> int) | B | TCall1@func1")
else:
reveal_type(obj, expected_text="list[int] | C | D | A")
reveal_type(obj, expected_text="list[int] | C | A")

0 comments on commit 43d9ac5

Please sign in to comment.