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
10 changes: 5 additions & 5 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pycroscope 0.4.0</div>
</th>
<th class='tc-header'><div class='tc-name'>ty 0.0.38</div>
<th class='tc-header'><div class='tc-name'>ty 0.0.40</div>
</th>
</tr>
<tr><th class="column" colspan="7">
Expand Down Expand Up @@ -237,7 +237,7 @@ <h3>Python Type System Conformance Test Results</h3>
<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 allow assigning a TypeForm to types.GenericAlias.</p><p>Does not allow passing a forward reference to a function accepting a TypeForm.</p></span></div></th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Fails to reject various weird annotations</p></span></div></th>
<th class="column col2 not-conformant">Unsupported</th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column" colspan="7">
<a class="test_group" href="https://typing.readthedocs.io/en/latest/spec/special-types.html">Special types in annotations</a>
Expand Down Expand Up @@ -515,7 +515,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;generics_variance_inference</th>
<th class="column col2 conformant">Pass</th>
Expand Down Expand Up @@ -628,7 +628,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" colspan="7">
<a class="test_group" href="https://typing.readthedocs.io/en/latest/spec/literal.html">Literals</a>
Expand Down Expand Up @@ -993,7 +993,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>Does not pass all assertions in the test file, due to limitations in ty's generics solver.</p><p></p><p>Incorrectly rejects a converter of `dict` combined with a default of `()`.</p><p>Incorrectly rejects passing a sequence of two-element string tuples to the `dict` constructor.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dataclasses_transform_field</th>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not properly handle field constructor that has default value for `kw_only` or `init` parameter.</p></span></div></th>
Expand Down
11 changes: 5 additions & 6 deletions conformance/results/ty/aliases_variance.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
conformance_automated = "Fail"
conformant = "Unsupported"
conformance_automated = "Pass"
errors_diff = """
Line 24: Expected 1 errors
Line 28: Expected 1 errors
Line 32: Expected 1 errors
Line 44: Expected 1 errors
"""
output = """
aliases_variance.py:24:16: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `ClassA`
aliases_variance.py:28:16: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `ClassA`
aliases_variance.py:32:16: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `ClassA`
aliases_variance.py:44:16: error[invalid-generic-class] Variance of type variable `T_contra` is incompatible with base class `ClassB`
"""
14 changes: 1 addition & 13 deletions conformance/results/ty/dataclasses_transform_converter.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Does not pass all assertions in the test file, due to limitations in ty's generics solver.

Incorrectly rejects a converter of `dict` combined with a default of `()`.
Incorrectly rejects passing a sequence of two-element string tuples to the `dict` constructor.
"""
conformance_automated = "Pass"
errors_diff = """
Line 104: Unexpected errors ['dataclasses_transform_converter.py:104:30: error[invalid-assignment] Object of type `dict[str, str] | dict[bytes, bytes]` is not assignable to `dict[str, str]`', "dataclasses_transform_converter.py:104:42: error[invalid-argument-type] Argument to function `model_field` is incorrect: Expected `(Iterable[list[str]] | Iterable[list[bytes]], /) -> dict[str, str] | dict[bytes, bytes]`, found `<class 'dict'>`"]
Line 121: Unexpected errors ['dataclasses_transform_converter.py:121:40: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, str]`, found `tuple[tuple[Literal["a"], Literal["1"]], tuple[Literal["b"], Literal["2"]]]`']
"""
output = """
dataclasses_transform_converter.py:48:31: error[invalid-argument-type] Argument to function `model_field` is incorrect: Expected `(Unknown, /) -> Unknown`, found `def bad_converter1() -> int`
dataclasses_transform_converter.py:49:31: error[invalid-argument-type] Argument to function `model_field` is incorrect: Expected `(Unknown, /) -> Unknown`, found `def bad_converter2(*, x: int) -> int`
dataclasses_transform_converter.py:104:30: error[invalid-assignment] Object of type `dict[str, str] | dict[bytes, bytes]` is not assignable to `dict[str, str]`
dataclasses_transform_converter.py:104:42: error[invalid-argument-type] Argument to function `model_field` is incorrect: Expected `(Iterable[list[str]] | Iterable[list[bytes]], /) -> dict[str, str] | dict[bytes, bytes]`, found `<class 'dict'>`
dataclasses_transform_converter.py:107:5: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `Literal[1]`
dataclasses_transform_converter.py:108:23: error[invalid-argument-type] Argument is incorrect: Expected `str | bytes`, found `Literal[1]`
dataclasses_transform_converter.py:109:29: error[invalid-argument-type] Argument is incorrect: Expected `str | list[str]`, found `complex`
dataclasses_transform_converter.py:118:1: error[invalid-assignment] Object of type `Literal[1]` is not assignable to attribute `field0` of type `str`
dataclasses_transform_converter.py:119:1: error[invalid-assignment] Object of type `Literal[1]` is not assignable to attribute `field3` of type `str | bytes`
dataclasses_transform_converter.py:121:40: error[invalid-argument-type] Argument is incorrect: Expected `dict[str, str]`, found `tuple[tuple[Literal["a"], Literal["1"]], tuple[Literal["b"], Literal["2"]]]`
dataclasses_transform_converter.py:130:31: error[invalid-argument-type] Argument to function `model_field` is incorrect: Expected `(str | Literal[1], /) -> int`, found `def converter_simple(s: str) -> int`
dataclasses_transform_converter.py:133:31: error[invalid-argument-type] Argument to function `model_field` is incorrect: Expected `(str | int, /) -> int`, found `def converter_simple(s: str) -> int`
"""
27 changes: 13 additions & 14 deletions conformance/results/ty/generics_variance.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
conformance_automated = "Fail"
conformant = "Unsupported"
conformance_automated = "Pass"
errors_diff = """
Line 77: Expected 1 errors
Line 81: Expected 1 errors
Line 93: Expected 1 errors
Line 105: Expected 1 errors
Line 113: Expected 1 errors
Line 163: Expected 1 errors
Line 167: Expected 1 errors
Line 191: Expected 1 errors
Lines 125, 126: Expected error (tag 'CoContra_Child2')
Lines 131, 132: Expected error (tag 'CoContra_Child3')
Lines 141, 142: Expected error (tag 'CoContra_Child5')
Lines 195, 196: Expected error (tag 'ContraToContraToContra_WithTA')
"""
output = """
generics_variance.py:14:6: error[invalid-legacy-type-variable] A `TypeVar` cannot be both covariant and contravariant
generics_variance.py:77:14: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `Inv`
generics_variance.py:81:14: error[invalid-generic-class] Variance of type variable `T_contra` is incompatible with base class `Inv`
generics_variance.py:93:17: error[invalid-generic-class] Variance of type variable `T_contra` is incompatible with base class `Co`
generics_variance.py:105:21: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `Contra`
generics_variance.py:113:21: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `Contra`
generics_variance.py:126:5: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `CoContra`
generics_variance.py:132:5: error[invalid-generic-class] Variance of type variable `T_contra` is incompatible with base class `CoContra`
generics_variance.py:142:5: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `CoContra`
generics_variance.py:163:26: error[invalid-generic-class] Variance of type variable `T_contra` is incompatible with base class `Contra`
generics_variance.py:167:30: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `Contra`
generics_variance.py:191:33: error[invalid-generic-class] Variance of type variable `T_contra` is incompatible with base class `Contra`
generics_variance.py:196:5: error[invalid-generic-class] Variance of type variable `T_co` is incompatible with base class `Contra`
"""
Loading