Skip to content

Commit

Permalink
Revert "update inline typed dict test due to upstream change that cau…
Browse files Browse the repository at this point in the history
…sed more errors to be reported on invalid ones"

guess the additional errors were a bug

This reverts commit 09ec86c.
  • Loading branch information
DetachHead committed Oct 2, 2024
1 parent 7d90b87 commit 16f4a73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

td3: dict[{"a": "list[float]"}] = {"a": [3]}

# This should generate three errors because dictionary literals can be used
# This should generate two errors because dictionary literals can be used
# only with dict or Dict.
err1: list[{"a": 1}]

Expand All @@ -21,7 +21,7 @@
# entries are not allowed.
err3: dict[{**{"a": int}}]

# This should generate four errors because Dict doesn't support inlined
# This should generate three errors because Dict doesn't support inlined
# TypedDict. It generates an exception at runtime.
err4: Dict[{"c": int}]

Expand Down
2 changes: 1 addition & 1 deletion packages/pyright-internal/src/tests/typeEvaluator7.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ test('TypedDictInline1', () => {
configOptions.diagnosticRuleSet.enableExperimentalFeatures = true;

const analysisResults = TestUtils.typeAnalyzeSampleFiles(['typedDictInline1.py'], configOptions);
TestUtils.validateResults(analysisResults, 11);
TestUtils.validateResults(analysisResults, 9);
});

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

0 comments on commit 16f4a73

Please sign in to comment.