You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -725,28 +725,28 @@ <h3>Python Type System Conformance Test Results</h3>
725
725
<thclass="column col2 conformant">Pass</th>
726
726
<thclass="column col2 conformant">Pass</th>
727
727
<thclass="column col2 conformant">Pass</th>
728
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
<thclass="column col2 not-conformant"><divclass="hover-text">Unsupported<spanclass="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>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not validate call to custom metaclass __call__ method through type[T].</p></span></div></th>
746
746
<thclass="column col2 conformant">Pass</th>
747
747
<thclass="column col2 conformant">Pass</th>
748
748
<thclass="column col2 conformant">Pass</th>
749
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
Copy file name to clipboardExpand all lines: conformance/results/ty/constructors_call_init.toml
-5Lines changed: 0 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,13 @@ conformant = "Partial"
3
3
notes = """
4
4
Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.
5
5
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.
7
6
"""
8
7
errors_diff = """
9
8
Line 42: Expected 1 errors
10
9
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]`']
13
10
"""
14
11
output = """
15
12
constructors_call_init.py:21:13: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `int`, found `float`
16
13
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]`
19
14
constructors_call_init.py:130:9: error[too-many-positional-arguments] Too many positional arguments to bound method `__init__`: expected 1, got 2
Copy file name to clipboardExpand all lines: conformance/results/ty/constructors_call_metaclass.toml
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
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
+
"""
3
6
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__`']
5
7
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"]
6
8
"""
7
9
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__`
10
10
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
11
11
constructors_call_metaclass.py:54:1: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
12
12
constructors_call_metaclass.py:68:1: error[missing-argument] No argument provided for required parameter `x` of function `__new__`
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]]`']
10
3
"""
11
4
output = """
12
5
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]]`
23
6
constructors_call_new.py:148:1: error[invalid-argument-type] Argument to function `__new__` is incorrect: Expected `type[Class11[int]]`, found `<class 'Class11[str]'>`
Copy file name to clipboardExpand all lines: conformance/results/ty/literals_literalstring.toml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ literals_literalstring.py:65:25: error[invalid-assignment] Object of type `str`
9
9
literals_literalstring.py:73:25: error[invalid-assignment] Object of type `Literal[3]` is not assignable to `LiteralString`
10
10
literals_literalstring.py:74:25: error[invalid-assignment] Object of type `Literal[b"test"]` is not assignable to `LiteralString`
11
11
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]`
12
13
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`
13
14
literals_literalstring.py:133:51: error[invalid-argument-type] Argument to bound method `__init__` is incorrect: Expected `LiteralString`, found `str`
14
15
literals_literalstring.py:171:21: error[invalid-assignment] Object of type `list[LiteralString]` is not assignable to `list[str]`
0 commit comments