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
<thclass="column col2 conformant"><divclass="hover-text">Pass*<spanclass="tooltip-text" id="bottom"><p>Type evaluation differs from other type checkers because of ambiguity in the spec related to method bindings.</p></span></div></th>
@@ -312,21 +312,21 @@ <h3>Python Type System Conformance Test Results</h3>
312
312
<thclass="column col2 conformant">Pass</th>
313
313
<thclass="column col2 conformant">Pass</th>
314
314
<thclass="column col2 conformant">Pass</th>
315
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject using a bare `ParamSpec` as a type alias value.</p><p>Does not support `Concatenate`.</p></span></div></th>
315
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject using a bare `ParamSpec` as a type alias value.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject usage of args/kwargs for out-of-scope ParamSpec</p></span></div></th>
322
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Incorrectly allows using `*args: P.args` and `**kwargs: P.kwargs` when `P` has not been put into scope by any other parameter annotation or enclosing scope.</p><p>Does not support `Concatenate`.</p></span></div></th>
322
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Incorrectly allows using `*args: P.args` and `**kwargs: P.kwargs` when `P` has not been put into scope by any other parameter annotation or enclosing scope.</p></span></div></th>
<thclass="column col2 conformant"><divclass="hover-text">Pass*<spanclass="tooltip-text" id="bottom"><p>Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed).</p></span></div></th>
327
327
<thclass="column col2 conformant">Pass</th>
328
328
<thclass="column col2 conformant">Pass</th>
329
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not support `Concatenate`.</p></span></div></th>
@@ -375,7 +375,7 @@ <h3>Python Type System Conformance Test Results</h3>
375
375
<thclass="column col2 conformant">Pass</th>
376
376
<thclass="column col2 conformant">Pass</th>
377
377
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not implement some restrictions on where Self can be used</p></span></div></th>
378
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject `Self` used in a return annotation when `self` is annotated using another type variable.</p><p>Does not reject `Self` used in staticmethods or metaclasses.</p></span></div></th>
378
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject `Self` used in a return annotation when `self` is annotated using another type variable.</p></span></div></th>
@@ -531,14 +531,14 @@ <h3>Python Type System Conformance Test Results</h3>
531
531
<thclass="column col2 conformant">Pass</th>
532
532
<thclass="column col2 conformant">Pass</th>
533
533
<thclass="column col2 conformant">Pass</th>
534
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>`Concatenate` in type aliases is currently unsupported</p></span></div></th>
534
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not emit a diagnostic on an invalid use of a variable as the right-hand side of a type alias.</p><p>Does not emit a diagnostic if a type alias to a union, in which every element of the union is implicitly specialized with `Unknown`, is invalidly specialized again.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject invalid syntax in implicit type aliases.</p></span></div></th>
541
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.</p><p>Does not support `Concatenate` in type aliases.</p></span></div></th>
541
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.</p><p>Falls short on full syntactic validation of type aliases.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>`NewType`s are incorrectly considered to be classes.</p></span></div></th>
@@ -694,7 +694,7 @@ <h3>Python Type System Conformance Test Results</h3>
694
694
<thclass="column col2 conformant">Pass</th>
695
695
<thclass="column col2 conformant">Pass</th>
696
696
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Parameter names are lost when resolving ParamSpec</p></span></div></th>
697
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not support `Concatenate`.</p><p>Infers a callback protocol as being a gradual type if the callback has signature `__call__[T](self, *args: T, **kwargs: T)` and `T` has been explicitly specialized to `Any`.</p><p>Does not infer a callback protocol as being a gradual type if the callback has signature `__call__(self, a: int, /, *args: Any, **kwargs: Any)`.</p></span></div></th>
697
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Infers a callback protocol as being a gradual type if the callback has signature `__call__[T](self, *args: T, **kwargs: T)` and `T` has been explicitly specialized to `Any`.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Allows callable without kwargs to be assigned to callable with unpacked kwargs</p></span></div></th>
@@ -895,7 +895,7 @@ <h3>Python Type System Conformance Test Results</h3>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="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>
@@ -1003,7 +1003,7 @@ <h3>Python Type System Conformance Test Results</h3>
@@ -1186,14 +1186,14 @@ <h3>Python Type System Conformance Test Results</h3>
1186
1186
<thclass="column col2 conformant">Pass</th>
1187
1187
<thclass="column col2 conformant">Pass</th>
1188
1188
<thclass="column col2 conformant">Pass</th>
1189
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Attempts to detect some errors even in blocks it determines to be unreachable, including in `if not TYPE_CHECKING` blocks.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not honor "# type: ignore" comment if comment includes additional text.</p></span></div></th>
1193
1193
<thclass="column col2 conformant">Pass</th>
1194
1194
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not honor "# type: ignore" comment if comment includes additional text.</p></span></div></th>
1195
1195
<thclass="column col2 conformant">Pass</th>
1196
-
<thclass="column col2 conformant">Pass</th>
1196
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Treats `# type: ignore[error-code]` as only ignoring errors that match the error code `error-code`.</p></span></div></th>
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_explicit.toml
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,14 @@
1
1
conformance_automated = "Fail"
2
2
conformant = "Partial"
3
-
notes = "`Concatenate` in type aliases is currently unsupported"
3
+
notes = """
4
+
Does not emit a diagnostic on an invalid use of a variable as the right-hand side of a type alias.
5
+
Does not emit a diagnostic if a type alias to a union, in which every element of the union is implicitly specialized with `Unknown`, is invalidly specialized again.
6
+
"""
4
7
errors_diff = """
5
8
Line 87: Expected 1 errors
6
9
Line 100: Expected 1 errors
7
-
Line 57: Unexpected errors ['aliases_explicit.py:57:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `(int, str, str, /) -> None`']
8
10
"""
9
11
output = """
10
-
aliases_explicit.py:57:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `(int, str, str, /) -> None`
Copy file name to clipboardExpand all lines: conformance/results/ty/aliases_implicit.toml
+1-3Lines changed: 1 addition & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,16 @@ conformance_automated = "Fail"
2
2
conformant = "Partial"
3
3
notes = """
4
4
Does not reject variables with `Any` or `Unknown` types when used as implicit type aliases.
5
-
Does not support `Concatenate` in type aliases.
5
+
Falls short on full syntactic validation of type aliases.
6
6
"""
7
7
errors_diff = """
8
8
Line 106: Expected 1 errors
9
9
Line 111: Expected 1 errors
10
10
Line 112: Expected 1 errors
11
11
Line 113: Expected 1 errors
12
12
Line 117: Expected 1 errors
13
-
Line 68: Unexpected errors ['aliases_implicit.py:68:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `(int, str, str, /) -> None`']
14
13
"""
15
14
output = """
16
-
aliases_implicit.py:68:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `(int, str, str, /) -> None`
annotations_generators.py:51:21: error[invalid-return-type] Function can implicitly return `None`, which is not assignable to return type `C`
6
+
annotations_generators.py:54:16: error[invalid-return-type] Return type does not match returned value: expected `C`, found `Literal[False]`
7
+
annotations_generators.py:57:15: error[invalid-yield] Yield type `Literal[3]` does not match annotated yield type `A`
8
+
annotations_generators.py:66:15: error[invalid-yield] Yield type `Literal[3]` does not match annotated yield type `A`
9
+
annotations_generators.py:75:11: error[invalid-yield] Yield type `B` does not match annotated yield type `A`
14
10
annotations_generators.py:86:21: error[invalid-return-type] Return type does not match returned value: expected `int`, found `types.GeneratorType`
15
11
annotations_generators.py:91:27: error[invalid-return-type] Return type does not match returned value: expected `int`, found `types.AsyncGeneratorType`
12
+
annotations_generators.py:118:16: error[invalid-yield] Yield type `A` does not match annotated yield type `B`
13
+
annotations_generators.py:119:16: error[invalid-yield] Yield type `int` does not match annotated yield type `B`
14
+
annotations_generators.py:135:16: error[invalid-yield] Send type `int` does not match annotated send type `str`
Infers a callback protocol as being a gradual type if the callback has signature `__call__[T](self, *args: T, **kwargs: T)` and `T` has been explicitly specialized to `Any`.
6
-
Does not infer a callback protocol as being a gradual type if the callback has signature `__call__(self, a: int, /, *args: Any, **kwargs: Any)`.
7
5
"""
8
6
errors_diff = """
9
-
Line 91: Expected 1 errors
10
-
Line 93: Expected 1 errors
11
7
Line 159: Expected 1 errors
12
-
Line 172: Expected 1 errors
13
-
Line 187: Expected 1 errors
14
-
Line 189: Expected 1 errors
15
-
Line 157: Unexpected errors ['callables_annotation.py:157:20: error[invalid-assignment] Object of type `Proto7` is not assignable to `Proto6`']
16
8
"""
17
9
output = """
18
10
callables_annotation.py:25:5: error[missing-argument] No argument provided for required parameter 2
@@ -29,5 +21,9 @@ callables_annotation.py:57:18: error[invalid-type-form] List literals are not al
29
21
callables_annotation.py:58:5: error[invalid-type-form] Special form `typing.Callable` expected exactly two arguments (parameter types and return type)
30
22
callables_annotation.py:58:14: error[invalid-type-form] The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...`
31
23
callables_annotation.py:59:14: error[invalid-type-form] `[...]` is not a valid parameter list for `Callable`: Did you mean `Callable[..., int]`?
32
-
callables_annotation.py:157:20: error[invalid-assignment] Object of type `Proto7` is not assignable to `Proto6`
24
+
callables_annotation.py:91:7: error[invalid-assignment] Object of type `def test_cb2() -> str` is not assignable to `(int, /, *args: Any, **kwargs: Any) -> str`
25
+
callables_annotation.py:93:7: error[invalid-assignment] Object of type `def test_cb4(*, a: int) -> str` is not assignable to `(int, /, *args: Any, **kwargs: Any) -> str`
26
+
callables_annotation.py:172:26: error[invalid-assignment] Object of type `() -> str` is not assignable to `(int, /, *args: Any, **kwargs: Any) -> str`
27
+
callables_annotation.py:187:48: error[invalid-assignment] Object of type `(int, str, /) -> str` is not assignable to `(str, /, *args: Any, **kwargs: Any) -> str`
28
+
callables_annotation.py:189:32: error[invalid-assignment] Object of type `(int, str, /) -> str` is not assignable to `(str, /, *args: Any, **kwargs: Any) -> str`
0 commit comments