Skip to content

Commit 418094f

Browse files
authored
Update ty results for v0.0.27 (#2231)
1 parent 77dec50 commit 418094f

11 files changed

+53
-57
lines changed

conformance/results/results.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ <h3>Python Type System Conformance Test Results</h3>
180180
</th>
181181
<th class='tc-header'><div class='tc-name'>pyrefly 0.58.0</div>
182182
</th>
183-
<th class='tc-header'><div class='tc-name'>ty 0.0.26</div>
183+
<th class='tc-header'><div class='tc-name'>ty 0.0.27</div>
184184
</th>
185185
</tr>
186186
<tr><th class="column" colspan="6">
@@ -497,7 +497,7 @@ <h3>Python Type System Conformance Test Results</h3>
497497
<th class="column col2 conformant">Pass</th>
498498
<th class="column col2 conformant">Pass</th>
499499
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject Final inside ClassVar.</p><p>Issues with NamedTuple interaction.</p></span></div></th>
500-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not forbid `Final`-annotated assignments to attributes on `self` in non-`__init__` methods.</p><p>Does not flag modifications of `Final`-annotated attributes via augmented assignment.</p></span></div></th>
500+
<th class="column col2 conformant">Pass</th>
501501
</tr>
502502
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qualifiers_final_decorator</th>
503503
<th class="column col2 conformant">Pass</th>
@@ -933,7 +933,7 @@ <h3>Python Type System Conformance Test Results</h3>
933933
<th class="column col2 conformant">Pass</th>
934934
<th class="column col2 conformant">Pass</th>
935935
<th class="column col2 conformant">Pass</th>
936-
<th class="column col2 not-conformant">Unsupported</th>
936+
<th class="column col2 conformant">Pass</th>
937937
</tr>
938938
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeddicts_class_syntax</th>
939939
<th class="column col2 conformant">Pass</th>
@@ -975,7 +975,7 @@ <h3>Python Type System Conformance Test Results</h3>
975975
<th class="column col2 conformant">Pass</th>
976976
<th class="column col2 conformant">Pass</th>
977977
<th class="column col2 conformant">Pass</th>
978-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Supports `ReadOnly`, but not the functional syntax for `TypedDict`s currently, leading to one assertion failing.</p></span></div></th>
978+
<th class="column col2 conformant">Pass</th>
979979
</tr>
980980
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeddicts_readonly_consistency</th>
981981
<th class="column col2 conformant">Pass</th>

conformance/results/ty/aliases_type_statement.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Lite
3434
aliases_type_statement.py:46:23: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression
3535
aliases_type_statement.py:47:23: error[invalid-type-form] Int literals are not allowed in this context in a type expression
3636
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type expressions
37-
aliases_type_statement.py:49:23: error[fstring-type-annotation] Type expressions cannot use f-strings
37+
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type expressions
3838
aliases_type_statement.py:62:23: error[unbound-type-variable] Type variable `V` is not bound to any outer generic context
3939
aliases_type_statement.py:67:17: error[unbound-type-variable] Type variable `T1` is not bound to any outer generic context
4040
aliases_type_statement.py:77:27: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int` of type variable `S@RecursiveTypeAlias2`

conformance/results/ty/dataclasses_final.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
dataclasses_final.py:27:1: error[invalid-assignment] Cannot assign to final attribute `final_classvar` on type `<class 'D'>`
6-
dataclasses_final.py:35:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `D`
7-
dataclasses_final.py:36:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `D`
8-
dataclasses_final.py:37:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `<class 'D'>`
9-
dataclasses_final.py:38:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `<class 'D'>`
5+
dataclasses_final.py:27:1: error[invalid-assignment] Cannot assign to final attribute `final_classvar` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body or `__init__`
6+
dataclasses_final.py:35:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `D`: `Final` attributes can only be assigned in the class body or `__init__`
7+
dataclasses_final.py:36:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `D`: `Final` attributes can only be assigned in the class body or `__init__`
8+
dataclasses_final.py:37:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body or `__init__`
9+
dataclasses_final.py:38:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body or `__init__`
1010
"""

conformance/results/ty/generics_syntax_infer_variance.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Line 28: Unexpected errors ['generics_syntax_infer_variance.py:28:37: error[inva
77
Line 46: Unexpected errors ['generics_syntax_infer_variance.py:46:37: error[invalid-assignment] Object of type `ShouldBeCovariant2[int]` is not assignable to `ShouldBeCovariant2[int | float]`']
88
Line 55: Unexpected errors ['generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of type `ShouldBeCovariant3[int]` is not assignable to `ShouldBeCovariant3[int | float]`']
99
Line 84: Unexpected errors ['generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[int | float]`']
10-
Line 92: Unexpected errors ['generics_syntax_infer_variance.py:92:9: error[invalid-assignment] Cannot assign to final attribute `x` on type `Self@__init__`']
1110
Line 95: Unexpected errors ['generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[int | float]`']
1211
Line 166: Unexpected errors ['generics_syntax_infer_variance.py:166:43: error[invalid-assignment] Object of type `ShouldBeContravariant1[int | float]` is not assignable to `ShouldBeContravariant1[int]`']
1312
"""
@@ -20,7 +19,6 @@ generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of typ
2019
generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[int | float]` is not assignable to `ShouldBeCovariant3[int]`
2120
generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[int | float]`
2221
generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[int | float]` is not assignable to `ShouldBeCovariant5[int]`
23-
generics_syntax_infer_variance.py:92:9: error[invalid-assignment] Cannot assign to final attribute `x` on type `Self@__init__`
2422
generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[int | float]`
2523
generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[int | float]` is not assignable to `ShouldBeCovariant6[int]`
2624
generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[int | float]`

conformance/results/ty/qualifiers_final_annotation.toml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
conformance_automated = "Fail"
2-
conformant = "Partial"
3-
notes = """
4-
Does not forbid `Final`-annotated assignments to attributes on `self` in non-`__init__` methods.
5-
Does not flag modifications of `Final`-annotated attributes via augmented assignment.
6-
"""
1+
conformance_automated = "Pass"
72
errors_diff = """
8-
Line 62: Expected 1 errors
9-
Line 63: Expected 1 errors
10-
Line 67: Expected 1 errors
113
"""
124
output = """
135
qualifiers_final_annotation.py:16:1: error[final-without-value] `Final` symbol `BAD1` is not assigned a value
146
qualifiers_final_annotation.py:18:7: error[invalid-type-form] Type qualifier `typing.Final` expected exactly 1 argument, got 2
157
qualifiers_final_annotation.py:34:5: error[final-without-value] `Final` symbol `ID2` is not assigned a value
168
qualifiers_final_annotation.py:38:5: error[final-without-value] `Final` symbol `ID3` is not assigned a value
17-
qualifiers_final_annotation.py:54:9: error[invalid-assignment] Cannot assign to final attribute `ID5` in `__init__` because it already has a value at class level
18-
qualifiers_final_annotation.py:65:9: error[invalid-assignment] Cannot assign to final attribute `ID7` on type `Self@method1`
9+
qualifiers_final_annotation.py:54:9: error[invalid-assignment] Invalid assignment to final attribute: `ID5` already has a value in the class body
10+
qualifiers_final_annotation.py:62:9: error[invalid-assignment] Cannot assign to final attribute `id3` on type `Self@method1`: `Final` attributes can only be assigned in the class body or `__init__`
11+
qualifiers_final_annotation.py:63:9: error[invalid-assignment] Cannot assign to final attribute `id4` on type `Self@method1`: `Final` attributes can only be assigned in the class body or `__init__`
12+
qualifiers_final_annotation.py:65:9: error[invalid-assignment] Cannot assign to final attribute `ID7` on type `Self@method1`: `Final` attributes can only be assigned in the class body or `__init__`
13+
qualifiers_final_annotation.py:67:9: error[invalid-assignment] Cannot assign to final attribute `ID7` on type `Self@method1`: `Final` attributes can only be assigned in the class body or `__init__`
1914
qualifiers_final_annotation.py:71:1: error[invalid-assignment] Reassignment of `Final` symbol `RATE` is not allowed: Symbol later reassigned here
20-
qualifiers_final_annotation.py:81:1: error[invalid-assignment] Cannot assign to final attribute `DEFAULT_ID` on type `<class 'ClassB'>`
15+
qualifiers_final_annotation.py:81:1: error[invalid-assignment] Cannot assign to final attribute `DEFAULT_ID` on type `<class 'ClassB'>`: `Final` attributes can only be assigned in the class body or `__init__`
2116
qualifiers_final_annotation.py:94:5: error[override-of-final-variable] Cannot override final variable `BORDER_WIDTH` from superclass `ClassC`
2217
qualifiers_final_annotation.py:107:13: error[redundant-final-classvar] `Combining `ClassVar` and `Final` is redundant
2318
qualifiers_final_annotation.py:108:13: error[redundant-final-classvar] `Combining `ClassVar` and `Final` is redundant
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
conformance_automated = "Fail"
2-
conformant = "Unsupported"
1+
conformance_automated = "Pass"
32
errors_diff = """
4-
Line 23: Expected 1 errors
5-
Line 27: Expected 1 errors
6-
Line 31: Expected 1 errors
7-
Line 35: Expected 1 errors
83
"""
94
output = """
5+
typeddicts_alt_syntax.py:23:44: error[invalid-argument-type] Expected a dict literal for parameter `fields` of `TypedDict()`
6+
typeddicts_alt_syntax.py:27:45: error[invalid-argument-type] Expected a string-literal key in the `fields` dict of `TypedDict()`: Found `Literal[1]`
7+
typeddicts_alt_syntax.py:31:27: error[invalid-argument-type] TypedDict name must match the variable it is assigned to: Expected "BadTypedDict3", got "WrongName"
8+
typeddicts_alt_syntax.py:35:72: error[unknown-argument] Argument `other` does not match any known parameter of function `TypedDict`
9+
typeddicts_alt_syntax.py:41:10: error[missing-argument] No argument provided for required parameter `fields` of function `TypedDict`
10+
typeddicts_alt_syntax.py:41:30: error[unknown-argument] Argument `name` does not match any known parameter of function `TypedDict`
11+
typeddicts_alt_syntax.py:41:40: error[unknown-argument] Argument `year` does not match any known parameter of function `TypedDict`
12+
typeddicts_alt_syntax.py:44:11: error[invalid-key] Unknown key "name" for TypedDict `Movie2`
13+
typeddicts_alt_syntax.py:44:35: error[invalid-key] Unknown key "year" for TypedDict `Movie2`
14+
typeddicts_alt_syntax.py:45:11: error[invalid-key] Unknown key "name" for TypedDict `Movie2`
15+
typeddicts_alt_syntax.py:45:35: error[invalid-key] Unknown key "year" for TypedDict `Movie2`
1016
"""

conformance/results/ty/typeddicts_extra_items.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
conformance_automated = "Fail"
22
conformant = "Unsupported"
33
errors_diff = """
4-
Line 22: Expected 1 errors
54
Line 49: Expected 1 errors
65
Line 67: Expected 1 errors
76
Line 73: Expected 1 errors
@@ -22,6 +21,7 @@ Lines 184, 185: Expected error (tag 'MovieRequiredYear')
2221
Lines 187, 188: Expected error (tag 'MovieNotRequiredYear')
2322
Lines 196, 197: Expected error (tag 'BookWithPublisher')
2423
Line 14: Unexpected errors ['typeddicts_extra_items.py:14:37: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `Movie`']
24+
Line 21: Unexpected errors ['typeddicts_extra_items.py:21:47: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `MovieFunctional`']
2525
Line 29: Unexpected errors ['typeddicts_extra_items.py:29:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `bool`', 'typeddicts_extra_items.py:29:23: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `Movie`']
2626
Line 43: Unexpected errors ['typeddicts_extra_items.py:43:5: error[invalid-key] Unknown key "other_extra_key" for TypedDict `InheritedMovie`']
2727
Line 129: Unexpected errors ['typeddicts_extra_items.py:129:15: error[invalid-argument-type] Cannot delete unknown key "year" from TypedDict `MovieEI`']
@@ -46,6 +46,8 @@ Line 343: Unexpected errors ['typeddicts_extra_items.py:343:9: error[invalid-arg
4646
output = """
4747
typeddicts_extra_items.py:14:37: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `Movie`
4848
typeddicts_extra_items.py:15:37: error[invalid-key] Unknown key "year" for TypedDict `Movie`
49+
typeddicts_extra_items.py:21:47: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `MovieFunctional`
50+
typeddicts_extra_items.py:22:47: error[invalid-key] Unknown key "year" for TypedDict `MovieFunctional`
4951
typeddicts_extra_items.py:29:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `bool`
5052
typeddicts_extra_items.py:29:23: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `Movie`
5153
typeddicts_extra_items.py:39:54: error[invalid-argument-type] Invalid argument to key "year" with declared type `int` on TypedDict `InheritedMovie`: value of type `None`

conformance/results/ty/typeddicts_readonly.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
conformance_automated = "Fail"
2-
conformant = "Partial"
3-
notes = """
4-
Supports `ReadOnly`, but not the functional syntax for `TypedDict`s currently, leading to one assertion failing.
5-
"""
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 36: Expected 1 errors
83
"""
94
output = """
105
typeddicts_readonly.py:24:4: error[invalid-assignment] Cannot assign to key "members" on TypedDict `Band`: key is marked read-only
6+
typeddicts_readonly.py:36:4: error[invalid-assignment] Cannot assign to key "members" on TypedDict `Band2`: key is marked read-only
117
typeddicts_readonly.py:50:4: error[invalid-assignment] Cannot assign to key "title" on TypedDict `Movie1`: key is marked read-only
128
typeddicts_readonly.py:51:4: error[invalid-assignment] Cannot assign to key "year" on TypedDict `Movie1`: key is marked read-only
139
typeddicts_readonly.py:60:4: error[invalid-assignment] Cannot assign to key "title" on TypedDict `Movie2`: key is marked read-only

conformance/results/ty/typeddicts_type_consistency.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ typeddicts_type_consistency.py:76:22: error[invalid-assignment] Object of type `
1010
typeddicts_type_consistency.py:77:25: error[invalid-assignment] Object of type `B3` is not assignable to `dict[str, object]`
1111
typeddicts_type_consistency.py:78:22: error[invalid-assignment] Object of type `B3` is not assignable to `dict[Any, Any]`
1212
typeddicts_type_consistency.py:82:25: error[invalid-assignment] Object of type `B3` is not assignable to `Mapping[str, int]`
13-
typeddicts_type_consistency.py:101:14: error[invalid-assignment] Object of type `Unknown | None` is not assignable to `str`
1413
typeddicts_type_consistency.py:126:56: error[invalid-argument-type] Invalid argument to key "inner_key" with declared type `str` on TypedDict `Inner1`: value of type `Literal[1]`
1514
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "ty 0.0.26"
1+
version = "ty 0.0.27"

0 commit comments

Comments
 (0)