Skip to content

Commit

Permalink
update narrowing test due to upstream bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Jul 3, 2024
1 parent b9eb89b commit bf16e6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def func2(x: type[A] | type[B] | None | int, y: type[A]):
if x is not y:
reveal_type(x, expected_text="type[B] | int | None")
else:
# this is wrong due to a bug from upstream that went undetected because they don't have reportUnreachable
# https://github.com/DetachHead/basedpyright/issues/467
reveal_type(x, expected_text="type[A]")


Expand Down
2 changes: 1 addition & 1 deletion packages/pyright-internal/src/tests/typeEvaluator1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ test('TypeNarrowingIsNone2', () => {
test('TypeNarrowingIsClass1', () => {
const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typeNarrowingIsClass1.py']);

TestUtils.validateResults(analysisResults, 0);
TestUtils.validateResults(analysisResults, 1);
});

test('TypeNarrowingIsNoneTuple1', () => {
Expand Down

0 comments on commit bf16e6a

Please sign in to comment.