Skip to content

Commit c0c4efb

Browse files
committed
Update ty results for v0.0.28
1 parent 25e73e5 commit c0c4efb

File tree

8 files changed

+32
-54
lines changed

8 files changed

+32
-54
lines changed

conformance/results/results.html

Lines changed: 5 additions & 5 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.28</div>
183+
<th class='tc-header'><div class='tc-name'>ty 0.0.29</div>
184184
</th>
185185
</tr>
186186
<tr><th class="column" colspan="6">
@@ -725,28 +725,28 @@ <h3>Python Type System Conformance Test Results</h3>
725725
<th class="column col2 conformant">Pass</th>
726726
<th class="column col2 conformant">Pass</th>
727727
<th class="column col2 conformant">Pass</th>
728-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.</p><p>Does not reject class-scoped type variables used in the `self` annotation.</p><p>Does not support inferring type variables for generic classes where the `__init__` method uses method-scoped type variables.</p></span></div></th>
728+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.</p><p>Does not reject class-scoped type variables used in the `self` annotation.</p></span></div></th>
729729
</tr>
730730
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructors_call_metaclass</th>
731731
<th class="column col2 not-conformant"><div class="hover-text">Unsupported<span class="tooltip-text" id="bottom"><p>Does not honor metaclass __call__ method when evaluating constructor call.</p><p>Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class.</p></span></div></th>
732732
<th class="column col2 conformant">Pass</th>
733733
<th class="column col2 conformant">Pass</th>
734734
<th class="column col2 conformant">Pass</th>
735-
<th class="column col2 not-conformant">Unsupported</th>
735+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Emits a diagnostic if `super().__call__()` is called in an overridden `__call__` method on a subclass of `type` and the first argument of the overridden `__call__` method is annotated with `type[T]` where `T` is a type variable with no upper bound.</p></span></div></th>
736736
</tr>
737737
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructors_call_new</th>
738738
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not support __new__ return type that is not a subclass of the class being constructed.</p><p>Does not skip evaluation of __init__ based on __new__ return type.</p><p>Does not report errors during binding to cls parameter of __new__ method.</p></span></div></th>
739739
<th class="column col2 conformant">Pass</th>
740740
<th class="column col2 conformant">Pass</th>
741741
<th class="column col2 conformant">Pass</th>
742-
<th class="column col2 not-conformant">Unsupported</th>
742+
<th class="column col2 conformant">Pass</th>
743743
</tr>
744744
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructors_call_type</th>
745745
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not validate call to custom metaclass __call__ method through type[T].</p></span></div></th>
746746
<th class="column col2 conformant">Pass</th>
747747
<th class="column col2 conformant">Pass</th>
748748
<th class="column col2 conformant">Pass</th>
749-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not support metaclass `__call__`.</p><p>Has overly lenient handling of calls to `type[T]` if `T` is a type variable without an upper bound.</p></span></div></th>
749+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Has overly lenient handling of calls to `type[T]` if `T` is a type variable without an upper bound.</p></span></div></th>
750750
</tr>
751751
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructors_callable</th>
752752
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not generate a union type for __new__ and __init__ when converting class to callable.</p><p>Does not ignore __init__ based on __new__ return type when converting class to callable.</p><p>Does not support __new__ return type that is different from class being constructed.</p></span></div></th>

conformance/results/ty/constructors_call_init.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,13 @@ conformant = "Partial"
33
notes = """
44
Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.
55
Does not reject class-scoped type variables used in the `self` annotation.
6-
Does not support inferring type variables for generic classes where the `__init__` method uses method-scoped type variables.
76
"""
87
errors_diff = """
98
Line 42: Expected 1 errors
109
Line 107: Expected 1 errors
11-
Line 91: Unexpected errors ['constructors_call_init.py:91:1: error[type-assertion-failure] Type `Class6[Unknown, Unknown]` does not match asserted type `Class6[int, str]`']
12-
Line 99: Unexpected errors ['constructors_call_init.py:99:1: error[type-assertion-failure] Type `Class7[Unknown, Unknown]` does not match asserted type `Class7[str, int]`']
1310
"""
1411
output = """
1512
constructors_call_init.py:21:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `float`
1613
constructors_call_init.py:56:1: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `Class4[int]`, found `Class4[str]`
17-
constructors_call_init.py:91:1: error[type-assertion-failure] Type `Class6[Unknown, Unknown]` does not match asserted type `Class6[int, str]`
18-
constructors_call_init.py:99:1: error[type-assertion-failure] Type `Class7[Unknown, Unknown]` does not match asserted type `Class7[str, int]`
1914
constructors_call_init.py:130:9: error[too-many-positional-arguments] Too many positional arguments to bound method `__init__`: expected 1, got 2
2015
"""

conformance/results/ty/constructors_call_metaclass.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
conformance_automated = "Fail"
2-
conformant = "Unsupported"
2+
conformant = "Partial"
3+
notes = """
4+
Emits a diagnostic if `super().__call__()` is called in an overridden `__call__` method on a subclass of `type` and the first argument of the overridden `__call__` method is annotated with `type[T]` where `T` is a type variable with no upper bound.
5+
"""
36
errors_diff = """
4-
Line 39: Unexpected errors ['constructors_call_metaclass.py:39:1: error[type-assertion-failure] Type `Class2` does not match asserted type `int | Meta2`', 'constructors_call_metaclass.py:39:13: error[missing-argument] No argument provided for required parameter `x` of function `__new__`']
57
Line 46: Unexpected errors ["constructors_call_metaclass.py:46:16: error[invalid-super-argument] `type[T@__call__]` is not an instance or subclass of `<class 'Meta3'>` in `super(<class 'Meta3'>, type[T@__call__])` call"]
68
"""
79
output = """
8-
constructors_call_metaclass.py:39:1: error[type-assertion-failure] Type `Class2` does not match asserted type `int | Meta2`
9-
constructors_call_metaclass.py:39:13: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
1010
constructors_call_metaclass.py:46:16: error[invalid-super-argument] `type[T@__call__]` is not an instance or subclass of `<class 'Meta3'>` in `super(<class 'Meta3'>, type[T@__call__])` call
1111
constructors_call_metaclass.py:54:1: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
1212
constructors_call_metaclass.py:68:1: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
1-
conformance_automated = "Fail"
2-
conformant = "Unsupported"
1+
conformance_automated = "Pass"
32
errors_diff = """
4-
Line 49: Unexpected errors ['constructors_call_new.py:49:1: error[type-assertion-failure] Type `Class3` does not match asserted type `int`', 'constructors_call_new.py:49:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`']
5-
Line 64: Unexpected errors ['constructors_call_new.py:64:1: error[type-assertion-failure] Type `Class4` does not match asserted type `Class4 | Any`', 'constructors_call_new.py:64:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`']
6-
Line 76: Unexpected errors ['constructors_call_new.py:76:5: error[type-assertion-failure] Type `Class5` does not match asserted type `Never`', 'constructors_call_new.py:76:17: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`']
7-
Line 89: Unexpected errors ['constructors_call_new.py:89:1: error[type-assertion-failure] Type `Class6` does not match asserted type `int | Class6`', 'constructors_call_new.py:89:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`']
8-
Line 117: Unexpected errors ['constructors_call_new.py:117:1: error[type-assertion-failure] Type `Class8[int]` does not match asserted type `Class8[list[int]]`']
9-
Line 118: Unexpected errors ['constructors_call_new.py:118:1: error[type-assertion-failure] Type `Class8[str]` does not match asserted type `Class8[list[str]]`']
103
"""
114
output = """
125
constructors_call_new.py:21:13: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `int`, found `float`
13-
constructors_call_new.py:49:1: error[type-assertion-failure] Type `Class3` does not match asserted type `int`
14-
constructors_call_new.py:49:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
15-
constructors_call_new.py:64:1: error[type-assertion-failure] Type `Class4` does not match asserted type `Class4 | Any`
16-
constructors_call_new.py:64:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
17-
constructors_call_new.py:76:5: error[type-assertion-failure] Type `Class5` does not match asserted type `Never`
18-
constructors_call_new.py:76:17: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
19-
constructors_call_new.py:89:1: error[type-assertion-failure] Type `Class6` does not match asserted type `int | Class6`
20-
constructors_call_new.py:89:13: error[missing-argument] No argument provided for required parameter `x` of bound method `__init__`
21-
constructors_call_new.py:117:1: error[type-assertion-failure] Type `Class8[int]` does not match asserted type `Class8[list[int]]`
22-
constructors_call_new.py:118:1: error[type-assertion-failure] Type `Class8[str]` does not match asserted type `Class8[list[str]]`
236
constructors_call_new.py:148:1: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `type[Class11[int]]`, found `<class 'Class11[str]'>`
247
"""
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
conformance_automated = "Fail"
22
conformant = "Partial"
33
notes = """
4-
Does not support metaclass `__call__`.
54
Has overly lenient handling of calls to `type[T]` if `T` is a type variable without an upper bound.
65
"""
76
errors_diff = """
8-
Line 30: Expected 1 errors
97
Line 64: Expected 1 errors
10-
Line 72: Expected 1 errors
118
"""
129
output = """
1310
constructors_call_type.py:19:55: warning[unused-type-ignore-comment] Unused blanket `type: ignore` directive
11+
constructors_call_type.py:30:5: error[missing-argument] No arguments provided for required parameters `x`, `y` of bound method `__call__`
1412
constructors_call_type.py:40:5: error[missing-argument] No arguments provided for required parameters `x`, `y` of function `__new__`
1513
constructors_call_type.py:50:5: error[missing-argument] No arguments provided for required parameters `x`, `y` of bound method `__init__`
1614
constructors_call_type.py:59:9: error[too-many-positional-arguments] Too many positional arguments to bound method `__init__`: expected 1, got 2
15+
constructors_call_type.py:72:5: error[missing-argument] No arguments provided for required parameters `x`, `y` of bound method `__call__`
1716
constructors_call_type.py:81:5: error[missing-argument] No argument provided for required parameter `y` of function `__new__`
1817
constructors_call_type.py:82:12: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `str`, found `Literal[2]`
1918
"""

conformance/results/ty/literals_literalstring.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ literals_literalstring.py:65:25: error[invalid-assignment] Object of type `str`
99
literals_literalstring.py:73:25: error[invalid-assignment] Object of type `Literal[3]` is not assignable to `LiteralString`
1010
literals_literalstring.py:74:25: error[invalid-assignment] Object of type `Literal[b"test"]` is not assignable to `LiteralString`
1111
literals_literalstring.py:119:22: error[invalid-argument-type] Argument to function `literal_identity` is incorrect: Argument type `str` does not satisfy upper bound `LiteralString` of type variable `TLiteral`
12+
literals_literalstring.py:133:41: error[invalid-assignment] Object of type `Container[T@Container]` is not assignable to `Container[LiteralString]`
1213
literals_literalstring.py:133:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Argument type `str` does not satisfy upper bound `LiteralString` of type variable `T`
1314
literals_literalstring.py:133:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `LiteralString`, found `str`
1415
literals_literalstring.py:171:21: error[invalid-assignment] Object of type `list[LiteralString]` is not assignable to `list[str]`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "ty 0.0.28"
1+
version = "ty 0.0.29"

0 commit comments

Comments
 (0)