Skip to content

Commit b9124c0

Browse files
conformance tests: fix scoring for typeddicts_inheritance (#1705)
Pyre and pytype produced an expected error on the wrong line. Part of #1692
1 parent 4025826 commit b9124c0

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

conformance/results/pyre/typeddicts_inheritance.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ typeddicts_inheritance.py:65:0 Invalid inheritance [39]: Field `x` has type `int
99
conformance_automated = "Fail"
1010
errors_diff = """
1111
Line 44: Expected 1 errors
12-
Line 55: Expected 1 errors
13-
Line 54: Unexpected errors ['typeddicts_inheritance.py:54:0 Inconsistent override [15]: `x` overrides attribute defined in `X1` inconsistently. Type `int` is not a subtype of the overridden attribute `str`.']
1412
"""

conformance/results/pytype/typeddicts_inheritance.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ File "typeddicts_inheritance.py", line 44, in <module>: Invalid base class: NonT
44
File "typeddicts_inheritance.py", line 54, in <module>: Invalid base class: X1 [base-class-error]
55
File "typeddicts_inheritance.py", line 65, in <module>: Invalid base class: Y2 [base-class-error]
66
"""
7-
conformance_automated = "Fail"
7+
conformance_automated = "Pass"
88
errors_diff = """
9-
Line 55: Expected 1 errors
10-
Line 54: Unexpected errors ['File "typeddicts_inheritance.py", line 54, in <module>: Invalid base class: X1 [base-class-error]']
119
"""

conformance/tests/typeddicts_inheritance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class BadTypedDict(TypedDict, NonTypedDict): # E
5151
class X1(TypedDict):
5252
x: str
5353

54-
class Y1(X1):
55-
x: int # E: cannot overwrite TypedDict field "x"
54+
class Y1(X1): # E[Y1]
55+
x: int # E[Y1]: cannot overwrite TypedDict field "x"
5656

5757

5858
# > Multiple inheritance does not allow conflict types for the same name field:

0 commit comments

Comments
 (0)