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
8 changes: 4 additions & 4 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pyrefly 0.58.0</div>
</th>
<th class='tc-header'><div class='tc-name'>ty 0.0.26</div>
<th class='tc-header'><div class='tc-name'>ty 0.0.27</div>
</th>
</tr>
<tr><th class="column" colspan="6">
Expand Down Expand Up @@ -497,7 +497,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<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>
<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>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qualifiers_final_decorator</th>
<th class="column col2 conformant">Pass</th>
Expand Down Expand Up @@ -933,7 +933,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeddicts_class_syntax</th>
<th class="column col2 conformant">Pass</th>
Expand Down Expand Up @@ -975,7 +975,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<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>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeddicts_readonly_consistency</th>
<th class="column col2 conformant">Pass</th>
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/ty/aliases_type_statement.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ aliases_type_statement.py:45:22: error[invalid-type-form] Variable of type `Lite
aliases_type_statement.py:46:23: error[invalid-type-form] Boolean literals are not allowed in this context in a type expression
aliases_type_statement.py:47:23: error[invalid-type-form] Int literals are not allowed in this context in a type expression
aliases_type_statement.py:48:23: error[invalid-type-form] Boolean operations are not allowed in type expressions
aliases_type_statement.py:49:23: error[fstring-type-annotation] Type expressions cannot use f-strings
aliases_type_statement.py:49:23: error[invalid-type-form] F-strings are not allowed in type expressions
aliases_type_statement.py:62:23: error[unbound-type-variable] Type variable `V` is not bound to any outer generic context
aliases_type_statement.py:67:17: error[unbound-type-variable] Type variable `T1` is not bound to any outer generic context
aliases_type_statement.py:77:27: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int` of type variable `S@RecursiveTypeAlias2`
Expand Down
10 changes: 5 additions & 5 deletions conformance/results/ty/dataclasses_final.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
dataclasses_final.py:27:1: error[invalid-assignment] Cannot assign to final attribute `final_classvar` on type `<class 'D'>`
dataclasses_final.py:35:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `D`
dataclasses_final.py:36:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `D`
dataclasses_final.py:37:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `<class 'D'>`
dataclasses_final.py:38:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `<class 'D'>`
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__`
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__`
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__`
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__`
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__`
"""
2 changes: 0 additions & 2 deletions conformance/results/ty/generics_syntax_infer_variance.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Line 28: Unexpected errors ['generics_syntax_infer_variance.py:28:37: error[inva
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]`']
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]`']
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]`']
Line 92: Unexpected errors ['generics_syntax_infer_variance.py:92:9: error[invalid-assignment] Cannot assign to final attribute `x` on type `Self@__init__`']
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]`']
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]`']
"""
Expand All @@ -20,7 +19,6 @@ generics_syntax_infer_variance.py:55:37: error[invalid-assignment] Object of typ
generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[int | float]` is not assignable to `ShouldBeCovariant3[int]`
generics_syntax_infer_variance.py:84:36: error[invalid-assignment] Object of type `ShouldBeCovariant5[int]` is not assignable to `ShouldBeCovariant5[int | float]`
generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[int | float]` is not assignable to `ShouldBeCovariant5[int]`
generics_syntax_infer_variance.py:92:9: error[invalid-assignment] Cannot assign to final attribute `x` on type `Self@__init__`
generics_syntax_infer_variance.py:95:36: error[invalid-assignment] Object of type `ShouldBeCovariant6[int]` is not assignable to `ShouldBeCovariant6[int | float]`
generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[int | float]` is not assignable to `ShouldBeCovariant6[int]`
generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[int | float]`
Expand Down
19 changes: 7 additions & 12 deletions conformance/results/ty/qualifiers_final_annotation.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Does not forbid `Final`-annotated assignments to attributes on `self` in non-`__init__` methods.
Does not flag modifications of `Final`-annotated attributes via augmented assignment.
"""
conformance_automated = "Pass"
errors_diff = """
Line 62: Expected 1 errors
Line 63: Expected 1 errors
Line 67: Expected 1 errors
"""
output = """
qualifiers_final_annotation.py:16:1: error[final-without-value] `Final` symbol `BAD1` is not assigned a value
qualifiers_final_annotation.py:18:7: error[invalid-type-form] Type qualifier `typing.Final` expected exactly 1 argument, got 2
qualifiers_final_annotation.py:34:5: error[final-without-value] `Final` symbol `ID2` is not assigned a value
qualifiers_final_annotation.py:38:5: error[final-without-value] `Final` symbol `ID3` is not assigned a value
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
qualifiers_final_annotation.py:65:9: error[invalid-assignment] Cannot assign to final attribute `ID7` on type `Self@method1`
qualifiers_final_annotation.py:54:9: error[invalid-assignment] Invalid assignment to final attribute: `ID5` already has a value in the class body
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__`
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__`
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__`
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__`
qualifiers_final_annotation.py:71:1: error[invalid-assignment] Reassignment of `Final` symbol `RATE` is not allowed: Symbol later reassigned here
qualifiers_final_annotation.py:81:1: error[invalid-assignment] Cannot assign to final attribute `DEFAULT_ID` on type `<class 'ClassB'>`
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__`
qualifiers_final_annotation.py:94:5: error[override-of-final-variable] Cannot override final variable `BORDER_WIDTH` from superclass `ClassC`
qualifiers_final_annotation.py:107:13: error[redundant-final-classvar] `Combining `ClassVar` and `Final` is redundant
qualifiers_final_annotation.py:108:13: error[redundant-final-classvar] `Combining `ClassVar` and `Final` is redundant
Expand Down
18 changes: 12 additions & 6 deletions conformance/results/ty/typeddicts_alt_syntax.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
conformance_automated = "Fail"
conformant = "Unsupported"
conformance_automated = "Pass"
errors_diff = """
Line 23: Expected 1 errors
Line 27: Expected 1 errors
Line 31: Expected 1 errors
Line 35: Expected 1 errors
"""
output = """
typeddicts_alt_syntax.py:23:44: error[invalid-argument-type] Expected a dict literal for parameter `fields` of `TypedDict()`
typeddicts_alt_syntax.py:27:45: error[invalid-argument-type] Expected a string-literal key in the `fields` dict of `TypedDict()`: Found `Literal[1]`
typeddicts_alt_syntax.py:31:27: error[invalid-argument-type] TypedDict name must match the variable it is assigned to: Expected "BadTypedDict3", got "WrongName"
typeddicts_alt_syntax.py:35:72: error[unknown-argument] Argument `other` does not match any known parameter of function `TypedDict`
typeddicts_alt_syntax.py:41:10: error[missing-argument] No argument provided for required parameter `fields` of function `TypedDict`
typeddicts_alt_syntax.py:41:30: error[unknown-argument] Argument `name` does not match any known parameter of function `TypedDict`
typeddicts_alt_syntax.py:41:40: error[unknown-argument] Argument `year` does not match any known parameter of function `TypedDict`
typeddicts_alt_syntax.py:44:11: error[invalid-key] Unknown key "name" for TypedDict `Movie2`
typeddicts_alt_syntax.py:44:35: error[invalid-key] Unknown key "year" for TypedDict `Movie2`
typeddicts_alt_syntax.py:45:11: error[invalid-key] Unknown key "name" for TypedDict `Movie2`
typeddicts_alt_syntax.py:45:35: error[invalid-key] Unknown key "year" for TypedDict `Movie2`
"""
4 changes: 3 additions & 1 deletion conformance/results/ty/typeddicts_extra_items.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
conformance_automated = "Fail"
conformant = "Unsupported"
errors_diff = """
Line 22: Expected 1 errors
Line 49: Expected 1 errors
Line 67: Expected 1 errors
Line 73: Expected 1 errors
Expand All @@ -22,6 +21,7 @@ Lines 184, 185: Expected error (tag 'MovieRequiredYear')
Lines 187, 188: Expected error (tag 'MovieNotRequiredYear')
Lines 196, 197: Expected error (tag 'BookWithPublisher')
Line 14: Unexpected errors ['typeddicts_extra_items.py:14:37: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `Movie`']
Line 21: Unexpected errors ['typeddicts_extra_items.py:21:47: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `MovieFunctional`']
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`']
Line 43: Unexpected errors ['typeddicts_extra_items.py:43:5: error[invalid-key] Unknown key "other_extra_key" for TypedDict `InheritedMovie`']
Line 129: Unexpected errors ['typeddicts_extra_items.py:129:15: error[invalid-argument-type] Cannot delete unknown key "year" from TypedDict `MovieEI`']
Expand All @@ -46,6 +46,8 @@ Line 343: Unexpected errors ['typeddicts_extra_items.py:343:9: error[invalid-arg
output = """
typeddicts_extra_items.py:14:37: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `Movie`
typeddicts_extra_items.py:15:37: error[invalid-key] Unknown key "year" for TypedDict `Movie`
typeddicts_extra_items.py:21:47: error[invalid-key] Unknown key "novel_adaptation" for TypedDict `MovieFunctional`
typeddicts_extra_items.py:22:47: error[invalid-key] Unknown key "year" for TypedDict `MovieFunctional`
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`
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`
Expand Down
8 changes: 2 additions & 6 deletions conformance/results/ty/typeddicts_readonly.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Supports `ReadOnly`, but not the functional syntax for `TypedDict`s currently, leading to one assertion failing.
"""
conformance_automated = "Pass"
errors_diff = """
Line 36: Expected 1 errors
"""
output = """
typeddicts_readonly.py:24:4: error[invalid-assignment] Cannot assign to key "members" on TypedDict `Band`: key is marked read-only
typeddicts_readonly.py:36:4: error[invalid-assignment] Cannot assign to key "members" on TypedDict `Band2`: key is marked read-only
typeddicts_readonly.py:50:4: error[invalid-assignment] Cannot assign to key "title" on TypedDict `Movie1`: key is marked read-only
typeddicts_readonly.py:51:4: error[invalid-assignment] Cannot assign to key "year" on TypedDict `Movie1`: key is marked read-only
typeddicts_readonly.py:60:4: error[invalid-assignment] Cannot assign to key "title" on TypedDict `Movie2`: key is marked read-only
Expand Down
1 change: 0 additions & 1 deletion conformance/results/ty/typeddicts_type_consistency.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ typeddicts_type_consistency.py:76:22: error[invalid-assignment] Object of type `
typeddicts_type_consistency.py:77:25: error[invalid-assignment] Object of type `B3` is not assignable to `dict[str, object]`
typeddicts_type_consistency.py:78:22: error[invalid-assignment] Object of type `B3` is not assignable to `dict[Any, Any]`
typeddicts_type_consistency.py:82:25: error[invalid-assignment] Object of type `B3` is not assignable to `Mapping[str, int]`
typeddicts_type_consistency.py:101:14: error[invalid-assignment] Object of type `Unknown | None` is not assignable to `str`
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]`
"""
2 changes: 1 addition & 1 deletion conformance/results/ty/version.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "ty 0.0.26"
version = "ty 0.0.27"
Loading