Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
DetachHead committed Mar 23, 2024
1 parent 3d57ae2 commit 6976347
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/pyright-internal/src/tests/checker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ test('PyrightIgnore2', () => {
const configOptions = new ConfigOptions(Uri.empty());

let analysisResults = TestUtils.typeAnalyzeSampleFiles(['pyrightIgnore2.py'], configOptions);
TestUtils.validateResults(analysisResults, 2);
TestUtils.validateResults(analysisResults, 1);

configOptions.diagnosticRuleSet.reportUnnecessaryTypeIgnoreComment = 'warning';
analysisResults = TestUtils.typeAnalyzeSampleFiles(['pyrightIgnore2.py'], configOptions);
TestUtils.validateResults(analysisResults, 2, 3);
TestUtils.validateResults(analysisResults, 1, 3);
});

test('pyrightIgnoreCommentsBased', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def func1(self, x: int | None) -> str:
v3 = x + x # pyright: ignore [foo, bar]

# This will not suppress the error
# erm actually it does because it's now treated the same as an ignore comment with no codes soooo
v4 = x + x # pyright: ignore []

# One of these is unnecessary
Expand Down

0 comments on commit 6976347

Please sign in to comment.