Skip to content

Commit d155152

Browse files
committed
Update conformance outputs after typeddicts changes
1 parent 26f812e commit d155152

9 files changed

+170
-24
lines changed

conformance/results/mypy/typeddicts_operations.toml

+20-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,26 @@ typeddicts_operations.py:28: error: Missing key "year" for TypedDict "Movie" [t
88
typeddicts_operations.py:29: error: Incompatible types (expression has type "float", TypedDict item "year" has type "int") [typeddict-item]
99
typeddicts_operations.py:32: error: Extra key "other" for TypedDict "Movie" [typeddict-unknown-key]
1010
typeddicts_operations.py:37: error: Expected TypedDict key to be string literal [misc]
11-
typeddicts_operations.py:47: error: "Movie" has no attribute "clear" [attr-defined]
12-
typeddicts_operations.py:49: error: Key "name" of TypedDict "Movie" cannot be deleted [misc]
13-
typeddicts_operations.py:62: error: "MovieOptional" has no attribute "clear" [attr-defined]
11+
typeddicts_operations.py:40: error: TypedDict key must be a string literal; expected one of ("name", "year") [literal-required]
12+
typeddicts_operations.py:41: error: Expected TypedDict key to be string literal [misc]
13+
typeddicts_operations.py:44: note: Revealed type is "Any"
14+
typeddicts_operations.py:44: error: TypedDict key must be a string literal; expected one of ("name", "year") [literal-required]
15+
typeddicts_operations.py:47: note: Revealed type is "builtins.bool"
16+
typeddicts_operations.py:58: note: Revealed type is "builtins.bool"
17+
typeddicts_operations.py:60: error: "Movie" has no attribute "clear" [attr-defined]
18+
typeddicts_operations.py:61: error: "Movie" has no attribute "popitem" [attr-defined]
19+
typeddicts_operations.py:63: error: Key "name" of TypedDict "Movie" cannot be deleted [misc]
20+
typeddicts_operations.py:80: note: Revealed type is "builtins.object"
21+
typeddicts_operations.py:83: note: Revealed type is "builtins.bool"
22+
typeddicts_operations.py:86: note: Revealed type is "builtins.bool"
23+
typeddicts_operations.py:88: error: "MovieOptional" has no attribute "clear" [attr-defined]
24+
typeddicts_operations.py:89: error: "MovieOptional" has no attribute "popitem" [attr-defined]
25+
typeddicts_operations.py:96: error: Expected TypedDict key to be string literal [misc]
26+
typeddicts_operations.py:99: error: TypedDict key must be a string literal; expected one of ("name", "year") [literal-required]
27+
typeddicts_operations.py:100: error: Expected TypedDict key to be string literal [misc]
28+
typeddicts_operations.py:103: note: Revealed type is "Any"
29+
typeddicts_operations.py:103: error: TypedDict key must be a string literal; expected one of ("name", "year") [literal-required]
30+
typeddicts_operations.py:106: note: Revealed type is "builtins.bool"
1431
"""
1532
conformance_automated = "Pass"
1633
errors_diff = """

conformance/results/mypy/version.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.15.0"
2-
test_duration = 2.1
2+
test_duration = 1.9

conformance/results/pyre/typeddicts_operations.toml

+20-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,26 @@ typeddicts_operations.py:28:8 TypedDict initialization error [55]: Missing requi
1010
typeddicts_operations.py:29:8 TypedDict initialization error [55]: Expected type `int` for `Movie` field `year` but got `float`.
1111
typeddicts_operations.py:32:8 TypedDict initialization error [55]: TypedDict `Movie` has no field `other`.
1212
typeddicts_operations.py:37:4 Incompatible variable type [9]: movie is declared to have type `Movie` but is used as type `Dict[str, Union[int, str]]`.
13-
typeddicts_operations.py:47:0 Undefined attribute [16]: `Movie` has no attribute `clear`.
14-
typeddicts_operations.py:49:0 Invalid TypedDict operation [54]: Cannot delete required field `name` from TypedDict `Movie`.
15-
typeddicts_operations.py:62:0 Undefined attribute [16]: `MovieOptional` has no attribute `clear`.
13+
typeddicts_operations.py:40:19 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('name', 'year').
14+
typeddicts_operations.py:41:23 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('name', 'year').
15+
typeddicts_operations.py:44:4 Revealed type [-1]: Revealed type for `existing_movie[variable_key]` is `str`.
16+
typeddicts_operations.py:44:31 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('name', 'year').
17+
typeddicts_operations.py:47:4 Revealed type [-1]: Revealed type for `variable_key in existing_movie` is `bool`.
18+
typeddicts_operations.py:58:0 Revealed type [-1]: Revealed type for `"other" in movie` is `bool`.
19+
typeddicts_operations.py:60:0 Undefined attribute [16]: `Movie` has no attribute `clear`.
20+
typeddicts_operations.py:61:0 Undefined attribute [16]: `Movie` has no attribute `popitem`.
21+
typeddicts_operations.py:63:0 Invalid TypedDict operation [54]: Cannot delete required field `name` from TypedDict `Movie`.
22+
typeddicts_operations.py:80:0 Revealed type [-1]: Revealed type for `movie_optional.get("other")` is `typing.Optional[object]`.
23+
typeddicts_operations.py:83:0 Revealed type [-1]: Revealed type for `"name" in movie_optional` is `bool`.
24+
typeddicts_operations.py:86:0 Revealed type [-1]: Revealed type for `"other" in movie_optional` is `bool`.
25+
typeddicts_operations.py:88:0 Undefined attribute [16]: `MovieOptional` has no attribute `clear`.
26+
typeddicts_operations.py:89:0 Undefined attribute [16]: `MovieOptional` has no attribute `popitem`.
27+
typeddicts_operations.py:96:4 Incompatible variable type [9]: movie_optional is declared to have type `MovieOptional` but is used as type `Dict[str, Union[int, str]]`.
28+
typeddicts_operations.py:99:28 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('name', 'year').
29+
typeddicts_operations.py:100:32 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('name', 'year').
30+
typeddicts_operations.py:103:4 Revealed type [-1]: Revealed type for `existing_optional_movie[variable_key]` is `str`.
31+
typeddicts_operations.py:103:40 TypedDict accessed with a non-literal [26]: TypedDict key must be a string literal. Expected one of ('name', 'year').
32+
typeddicts_operations.py:106:4 Revealed type [-1]: Revealed type for `variable_key in existing_optional_movie` is `bool`.
1633
"""
1734
conformance_automated = "Pass"
1835
errors_diff = """

conformance/results/pyre/version.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.23"
2-
test_duration = 3.9
2+
test_duration = 1.6

conformance/results/pyright/typeddicts_operations.toml

+30-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
conformant = "Pass"
1+
conformant = "Fail"
22
output = """
33
typeddicts_operations.py:22:1 - error: Could not assign item in TypedDict
44
  "Literal[1982]" is not assignable to "str" (reportGeneralTypeIssues)
@@ -15,13 +15,38 @@ typeddicts_operations.py:29:42 - error: Type "dict[str, str | float]" is not ass
1515
typeddicts_operations.py:32:36 - error: Type "dict[str, str | int]" is not assignable to declared type "Movie"
1616
  "other" is an undefined item in type "Movie" (reportAssignmentType)
1717
typeddicts_operations.py:37:20 - error: Type "dict[str, str | int]" is not assignable to declared type "Movie" (reportAssignmentType)
18-
typeddicts_operations.py:47:7 - error: Cannot access attribute "clear" for class "Movie"
18+
typeddicts_operations.py:44:17 - information: Type of "existing_movie[variable_key]" is "Unknown"
19+
typeddicts_operations.py:47:17 - information: Type of "variable_key in existing_movie" is "bool"
20+
typeddicts_operations.py:48:17 - error: "assert_type" mismatch: expected "object | None" but received "Any | None" (reportAssertTypeFailure)
21+
typeddicts_operations.py:58:13 - information: Type of ""other" in movie" is "bool"
22+
typeddicts_operations.py:60:7 - error: Cannot access attribute "clear" for class "Movie"
1923
  Attribute "clear" is unknown (reportAttributeAccessIssue)
20-
typeddicts_operations.py:49:5 - error: Could not delete item in TypedDict
24+
typeddicts_operations.py:61:7 - error: Cannot access attribute "popitem" for class "Movie"
25+
  Attribute "popitem" is unknown (reportAttributeAccessIssue)
26+
typeddicts_operations.py:63:5 - error: Could not delete item in TypedDict
2127
  "name" is a required key and cannot be deleted (reportGeneralTypeIssues)
22-
typeddicts_operations.py:62:16 - error: Cannot access attribute "clear" for class "MovieOptional"
28+
typeddicts_operations.py:76:1 - error: Could not access item in TypedDict
29+
  "name" is not a required key in "MovieOptional", so access may result in runtime exception (reportTypedDictNotRequiredAccess)
30+
typeddicts_operations.py:80:13 - information: Type of "movie_optional.get("other")" is "Any | None"
31+
typeddicts_operations.py:83:13 - information: Type of ""name" in movie_optional" is "bool"
32+
typeddicts_operations.py:86:13 - information: Type of ""other" in movie_optional" is "bool"
33+
typeddicts_operations.py:88:16 - error: Cannot access attribute "clear" for class "MovieOptional"
2334
  Attribute "clear" is unknown (reportAttributeAccessIssue)
35+
typeddicts_operations.py:89:16 - error: Cannot access attribute "popitem" for class "MovieOptional"
36+
  Attribute "popitem" is unknown (reportAttributeAccessIssue)
37+
typeddicts_operations.py:96:37 - error: Type "dict[str, str | int]" is not assignable to declared type "MovieOptional" (reportAssignmentType)
38+
typeddicts_operations.py:103:17 - information: Type of "existing_optional_movie[variable_key]" is "Unknown"
39+
typeddicts_operations.py:106:17 - information: Type of "variable_key in existing_optional_movie" is "bool"
40+
typeddicts_operations.py:107:17 - error: "assert_type" mismatch: expected "object | None" but received "Any | None" (reportAssertTypeFailure)
2441
"""
25-
conformance_automated = "Pass"
42+
conformance_automated = "Fail"
2643
errors_diff = """
44+
Line 40: Expected 1 errors
45+
Line 41: Expected 1 errors
46+
Line 44: Expected 1 errors
47+
Line 99: Expected 1 errors
48+
Line 100: Expected 1 errors
49+
Line 103: Expected 1 errors
50+
Line 48: Unexpected errors ['typeddicts_operations.py:48:17 - error: "assert_type" mismatch: expected "object | None" but received "Any | None" (reportAssertTypeFailure)']
51+
Line 107: Unexpected errors ['typeddicts_operations.py:107:17 - error: "assert_type" mismatch: expected "object | None" but received "Any | None" (reportAssertTypeFailure)']
2752
"""
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyright 1.1.399"
2-
test_duration = 2.5
2+
test_duration = 2.4

conformance/results/pytype/typeddicts_operations.toml

+92-5
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,107 @@ typeddicts_operations.py:37:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in f
2626
movie: Movie = {variable_key: "", "year": 1900} # E: variable key
2727
\u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m
2828
29-
typeddicts_operations.py:60:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: str [assert-type]
29+
typeddicts_operations.py:40:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: TypedDict Movie requires all keys to be constant strings [typed-dict-error]
30+
31+
existing_movie[variable_key] = 1982 # E: variable key
32+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
33+
34+
typeddicts_operations.py:41:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: TypedDict Movie requires all keys to be constant strings [typed-dict-error]
35+
36+
del existing_movie[variable_key] # E
37+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
38+
39+
typeddicts_operations.py:44:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: TypedDict Movie requires all keys to be constant strings [typed-dict-error]
40+
41+
reveal_type(existing_movie[variable_key]) # E
42+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
43+
44+
typeddicts_operations.py:44:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: Any [reveal-type]
45+
46+
reveal_type(existing_movie[variable_key]) # E
47+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
48+
49+
typeddicts_operations.py:47:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: bool [reveal-type]
50+
51+
reveal_type(variable_key in existing_movie) # `bool`
52+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
53+
54+
typeddicts_operations.py:48:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func1: None [assert-type]
55+
56+
assert_type(existing_movie.get(variable_key), object | None)
57+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
58+
59+
typeddicts_operations.py:58:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: bool [reveal-type]
60+
61+
reveal_type("other" in movie) # E?
62+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
63+
64+
typeddicts_operations.py:77:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: str [assert-type]
3065
3166
assert_type(movie_optional.get("name"), str | None)
3267
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
3368
69+
typeddicts_operations.py:80:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: None [reveal-type]
70+
71+
reveal_type(movie_optional.get("other")) # E?
72+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
73+
74+
typeddicts_operations.py:83:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: bool [reveal-type]
75+
76+
reveal_type("name" in movie_optional) # E?
77+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
78+
79+
typeddicts_operations.py:86:1: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: bool [reveal-type]
80+
81+
reveal_type("other" in movie_optional) # E?
82+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
83+
84+
typeddicts_operations.py:99:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: TypedDict MovieOptional requires all keys to be constant strings [typed-dict-error]
85+
86+
existing_optional_movie[variable_key] = 1982 # E: variable key
87+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
88+
89+
typeddicts_operations.py:100:9: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: TypedDict MovieOptional requires all keys to be constant strings [typed-dict-error]
90+
91+
del existing_optional_movie[variable_key] # E: variable key
92+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
93+
94+
typeddicts_operations.py:103:17: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: TypedDict MovieOptional requires all keys to be constant strings [typed-dict-error]
95+
96+
reveal_type(existing_optional_movie[variable_key]) # E
97+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
98+
99+
typeddicts_operations.py:103:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: Any [reveal-type]
100+
101+
reveal_type(existing_optional_movie[variable_key]) # E
102+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
103+
104+
typeddicts_operations.py:106:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: bool [reveal-type]
105+
106+
reveal_type(variable_key in existing_optional_movie) # `bool`
107+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
108+
109+
typeddicts_operations.py:107:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in func2: None [assert-type]
110+
111+
assert_type(existing_optional_movie.get(variable_key), object | None)
112+
\u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m
113+
34114
"""
35115
conformance_automated = "Fail"
36116
errors_diff = """
37117
Line 22: Expected 1 errors
38118
Line 23: Expected 1 errors
39119
Line 24: Expected 1 errors
40120
Line 26: Expected 1 errors
41-
Line 47: Expected 1 errors
42-
Line 49: Expected 1 errors
43-
Line 62: Expected 1 errors
44-
Line 60: Unexpected errors ['typeddicts_operations.py:60:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: str [assert-type]']
121+
Line 60: Expected 1 errors
122+
Line 61: Expected 1 errors
123+
Line 63: Expected 1 errors
124+
Line 88: Expected 1 errors
125+
Line 89: Expected 1 errors
126+
Line 96: Expected 1 errors
127+
Line 47: Unexpected errors ['typeddicts_operations.py:47:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: bool [reveal-type]']
128+
Line 48: Unexpected errors ['typeddicts_operations.py:48:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func1: None [assert-type]']
129+
Line 77: Unexpected errors ['typeddicts_operations.py:77:1: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: str [assert-type]']
130+
Line 106: Unexpected errors ['typeddicts_operations.py:106:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: bool [reveal-type]']
131+
Line 107: Unexpected errors ['typeddicts_operations.py:107:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in func2: None [assert-type]']
45132
"""
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pytype 2024.10.11"
2-
test_duration = 42.2
2+
test_duration = 37.8

conformance/results/results.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ <h3>Python Type System Conformance Test Results</h3>
159159
<div class="table_container"><table><tbody>
160160
<tr><th class="col1">&nbsp;</th>
161161
<th class='tc-header'><div class='tc-name'>mypy 1.15.0</div>
162-
<div class='tc-time'>2.1sec</div>
162+
<div class='tc-time'>1.9sec</div>
163163
</th>
164164
<th class='tc-header'><div class='tc-name'>pyright 1.1.399</div>
165-
<div class='tc-time'>2.5sec</div>
165+
<div class='tc-time'>2.4sec</div>
166166
</th>
167167
<th class='tc-header'><div class='tc-name'>pyre 0.9.23</div>
168-
<div class='tc-time'>3.9sec</div>
168+
<div class='tc-time'>1.6sec</div>
169169
</th>
170170
<th class='tc-header'><div class='tc-name'>pytype 2024.10.11</div>
171-
<div class='tc-time'>42.2sec</div>
171+
<div class='tc-time'>37.8sec</div>
172172
</th>
173173
</tr>
174174
<tr><th class="column" colspan="5">

0 commit comments

Comments
 (0)