Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions conformance/results/pyre/typeddicts_inheritance.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@ typeddicts_inheritance.py:65:0 Invalid inheritance [39]: Field `x` has type `int
conformance_automated = "Fail"
errors_diff = """
Line 44: Expected 1 errors
Line 55: Expected 1 errors
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`.']
"""
4 changes: 1 addition & 3 deletions conformance/results/pytype/typeddicts_inheritance.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ File "typeddicts_inheritance.py", line 44, in <module>: Invalid base class: NonT
File "typeddicts_inheritance.py", line 54, in <module>: Invalid base class: X1 [base-class-error]
File "typeddicts_inheritance.py", line 65, in <module>: Invalid base class: Y2 [base-class-error]
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 55: Expected 1 errors
Line 54: Unexpected errors ['File "typeddicts_inheritance.py", line 54, in <module>: Invalid base class: X1 [base-class-error]']
"""
4 changes: 2 additions & 2 deletions conformance/tests/typeddicts_inheritance.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class BadTypedDict(TypedDict, NonTypedDict): # E
class X1(TypedDict):
x: str

class Y1(X1):
x: int # E: cannot overwrite TypedDict field "x"
class Y1(X1): # E[Y1]
x: int # E[Y1]: cannot overwrite TypedDict field "x"


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