Skip to content

Commit bbaa4d1

Browse files
Update ty results for v0.0.48 (#2303)
1 parent f9664d8 commit bbaa4d1

10 files changed

Lines changed: 57 additions & 109 deletions

conformance/results/results.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ <h3>Python Type System Conformance Test Results</h3>
182182
</th>
183183
<th class='tc-header'><div class='tc-name'>pycroscope 0.4.0</div>
184184
</th>
185-
<th class='tc-header'><div class='tc-name'>ty 0.0.40</div>
185+
<th class='tc-header'><div class='tc-name'>ty 0.0.48</div>
186186
</th>
187187
</tr>
188188
<tr><th class="column" colspan="7">
@@ -832,7 +832,7 @@ <h3>Python Type System Conformance Test Results</h3>
832832
<th class="column col2 conformant">Pass</th>
833833
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Converting constructor to callable does not preserve class-scoped type params.</p></span></div></th>
834834
<th class="column col2 conformant">Pass</th>
835-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not include `__init__` when `__new__` returns `Self`.</p><p>Does not respect `NoReturn` return type on metaclass `__call__`.</p><p>Does not ignore `__init__` when `__new__` returns `Any`.</p><p>Unions overload return types.</p></span></div></th>
835+
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not include `__init__` when `__new__` returns `Self`.</p><p>Does not ignore `__init__` when `__new__` returns `Any`.</p><p>Unions overload return types.</p></span></div></th>
836836
</tr>
837837
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;constructors_consistency</th>
838838
<th class="column col2 conformant"><div class="hover-text">Pass*<span class="tooltip-text" id="bottom"><p>Does not report inconsistency between __new__ and __init__ (optional).</p></span></div></th>
@@ -1052,7 +1052,7 @@ <h3>Python Type System Conformance Test Results</h3>
10521052
<th class="column col2 conformant">Pass</th>
10531053
<th class="column col2 conformant">Pass</th>
10541054
<th class="column col2 conformant">Pass</th>
1055-
<th class="column col2 not-conformant">Unsupported</th>
1055+
<th class="column col2 conformant">Pass</th>
10561056
</tr>
10571057
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeddicts_final</th>
10581058
<th class="column col2 conformant">Pass</th>

conformance/results/ty/callables_annotation.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ callables_annotation.py:29:5: error[missing-argument] No arguments provided for
1414
callables_annotation.py:29:8: error[unknown-argument] Argument `a` does not match any known parameter
1515
callables_annotation.py:29:13: error[unknown-argument] Argument `b` does not match any known parameter
1616
callables_annotation.py:35:8: error[too-many-positional-arguments] Too many positional arguments: expected 0, got 1
17-
callables_annotation.py:55:5: error[invalid-type-form] Special form `typing.Callable` expected exactly two arguments (parameter types and return type)
17+
callables_annotation.py:55:5: error[invalid-type-form] Special form `Callable` expected exactly two arguments (parameter types and return type)
1818
callables_annotation.py:55:14: error[invalid-type-form] The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...`
1919
callables_annotation.py:56:14: error[invalid-type-form] The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...`
2020
callables_annotation.py:57:18: error[invalid-type-form] List literals are not allowed in this context in a type expression: Did you mean `list[int]`?
21-
callables_annotation.py:58:5: error[invalid-type-form] Special form `typing.Callable` expected exactly two arguments (parameter types and return type)
21+
callables_annotation.py:58:5: error[invalid-type-form] Special form `Callable` expected exactly two arguments (parameter types and return type)
2222
callables_annotation.py:58:14: error[invalid-type-form] The first argument to `Callable` must be either a list of types, ParamSpec, Concatenate, or `...`
2323
callables_annotation.py:59:14: error[invalid-type-form] `[...]` is not a valid parameter list for `Callable`: Did you mean `Callable[..., int]`?
2424
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`

conformance/results/ty/constructors_callable.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ conformance_automated = "Fail"
22
conformant = "Partial"
33
notes = """
44
Does not include `__init__` when `__new__` returns `Self`.
5-
Does not respect `NoReturn` return type on metaclass `__call__`.
65
Does not ignore `__init__` when `__new__` returns `Any`.
76
Unions overload return types.
87
"""
98
errors_diff = """
109
Line 66: Expected 1 errors
1110
Line 67: Expected 1 errors
1211
Line 68: Expected 1 errors
13-
Line 102: Unexpected errors ['constructors_callable.py:102:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`']
14-
Line 107: Unexpected errors ['constructors_callable.py:107:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`']
1512
Line 143: Unexpected errors ["constructors_callable.py:143:27: error[invalid-argument-type] Argument to function `accepts_callable` is incorrect: Expected `() -> Any | Class6Any`, found `<class 'Class6Any'>`"]
1613
Line 145: Unexpected errors ['constructors_callable.py:145:1: error[type-assertion-failure] Type `Any | Class6Any` does not match asserted type `Any`']
1714
Line 166: Unexpected errors ['constructors_callable.py:166:1: error[type-assertion-failure] Type `Class7[int] | Class7[str]` does not match asserted type `Class7[int]`']
@@ -29,9 +26,7 @@ constructors_callable.py:79:13: info[revealed-type] Revealed type: `(x: int) ->
2926
constructors_callable.py:81:1: error[missing-argument] No argument provided for required parameter `x`
3027
constructors_callable.py:82:1: error[missing-argument] No argument provided for required parameter `x`
3128
constructors_callable.py:82:4: error[unknown-argument] Argument `y` does not match any known parameter
32-
constructors_callable.py:99:13: info[revealed-type] Revealed type: `(...) -> Unknown`
33-
constructors_callable.py:102:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`
34-
constructors_callable.py:107:5: error[type-assertion-failure] Type `Unknown` does not match asserted type `Never`
29+
constructors_callable.py:99:13: info[revealed-type] Revealed type: `(...) -> Never`
3530
constructors_callable.py:127:13: info[revealed-type] Revealed type: `() -> Class6Proxy`
3631
constructors_callable.py:129:4: error[too-many-positional-arguments] Too many positional arguments: expected 0, got 1
3732
constructors_callable.py:143:27: error[invalid-argument-type] Argument to function `accepts_callable` is incorrect: Expected `() -> Any | Class6Any`, found `<class 'Class6Any'>`

conformance/results/ty/generics_self_usage.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ generics_self_usage.py:76:6: error[invalid-type-form] Variable of type `<special
1313
generics_self_usage.py:87:16: error[invalid-return-type] Return type does not match returned value: expected `Self@return_concrete_type`, found `Foo3`
1414
generics_self_usage.py:103:15: error[invalid-type-form] Variable of type `<special-form 'typing.Self'>` is not allowed in a type expression
1515
generics_self_usage.py:105:12: error[invalid-base] Invalid class base with type `<special-form 'typing.Self'>`
16-
generics_self_usage.py:108:30: error[invalid-type-form] Variable of type `<special-form 'typing.Self'>` is not allowed in a type alias value
16+
generics_self_usage.py:108:30: error[invalid-type-form] `Self` cannot be used in a type alias
1717
generics_self_usage.py:113:19: error[invalid-type-form] `Self` cannot be used in a static method
1818
generics_self_usage.py:118:31: error[invalid-type-form] `Self` cannot be used in a static method
1919
generics_self_usage.py:118:40: error[invalid-type-form] `Self` cannot be used in a static method

conformance/results/ty/tuples_type_compat.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ tuples_type_compat.py:32:10: error[invalid-assignment] Object of type `tuple[int
88
tuples_type_compat.py:33:10: error[invalid-assignment] Object of type `tuple[int, ...]` is not assignable to `tuple[int]`
99
tuples_type_compat.py:43:22: error[invalid-assignment] Object of type `tuple[int, ...]` is not assignable to `tuple[int]`
1010
tuples_type_compat.py:62:26: error[invalid-assignment] Object of type `tuple[int, ...]` is not assignable to `tuple[int, int]`
11-
tuples_type_compat.py:75:9: error[type-assertion-failure] Type `tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]` does not match asserted type `tuple[int]`
12-
tuples_type_compat.py:80:9: error[type-assertion-failure] Type `tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]` does not match asserted type `tuple[str, str] | tuple[int, int]`
13-
tuples_type_compat.py:85:9: error[type-assertion-failure] Type `tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]` does not match asserted type `tuple[int, str, int]`
14-
tuples_type_compat.py:101:13: error[type-assertion-failure] Type `tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]` does not match asserted type `tuple[int]`
15-
tuples_type_compat.py:106:13: error[type-assertion-failure] Type `tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]` does not match asserted type `tuple[str, str] | tuple[int, int]`
16-
tuples_type_compat.py:111:13: error[type-assertion-failure] Type `tuple[int] | tuple[str, str] | tuple[int, *tuple[str, ...], int]` does not match asserted type `tuple[int, str, int]`
17-
tuples_type_compat.py:126:13: error[type-assertion-failure] Type `tuple[int | str, int | str]` does not match asserted type `tuple[int | str, str]`
18-
tuples_type_compat.py:129:13: error[type-assertion-failure] Type `tuple[int | str, int | str]` does not match asserted type `tuple[int | str, int]`
11+
tuples_type_compat.py:75:9: error[type-assertion-failure] Type `tuple[int] | (tuple[int, *tuple[str, ...], int] & ExactlySized[Literal[1, True]])` does not match asserted type `tuple[int]`
12+
tuples_type_compat.py:80:9: error[type-assertion-failure] Type `tuple[str, str] | (tuple[int, *tuple[str, ...], int] & ExactlySized[Literal[2]])` does not match asserted type `tuple[str, str] | tuple[int, int]`
13+
tuples_type_compat.py:85:9: error[type-assertion-failure] Type `tuple[int, *tuple[str, ...], int] & ExactlySized[Literal[3]]` does not match asserted type `tuple[int, str, int]`
14+
tuples_type_compat.py:101:13: error[type-assertion-failure] Type `tuple[int] | (tuple[int, *tuple[str, ...], int] & <Protocol with members '__getitem__', '__len__'>)` does not match asserted type `tuple[int]`
15+
tuples_type_compat.py:106:13: error[type-assertion-failure] Type `tuple[str, str] | (tuple[int, *tuple[str, ...], int] & <Protocol with members '__getitem__', '__len__'> & ~<Protocol with members '__getitem__', '__len__'>)` does not match asserted type `tuple[str, str] | tuple[int, int]`
16+
tuples_type_compat.py:111:13: error[type-assertion-failure] Type `tuple[int, *tuple[str, ...], int] & <Protocol with members '__getitem__', '__len__'> & ~<Protocol with members '__getitem__', '__len__'> & ~<Protocol with members '__getitem__', '__len__'>` does not match asserted type `tuple[int, str, int]`
17+
tuples_type_compat.py:126:13: error[type-assertion-failure] Type `tuple[int | str, int | str] & <Protocol with members '__getitem__', '__len__'>` does not match asserted type `tuple[int | str, str]`
18+
tuples_type_compat.py:129:13: error[type-assertion-failure] Type `tuple[int | str, int | str] & ~<Protocol with members '__getitem__', '__len__'>` does not match asserted type `tuple[int | str, int]`
1919
tuples_type_compat.py:157:6: error[invalid-assignment] Object of type `tuple[Literal[1], Literal[""], Literal[""]]` is not assignable to `tuple[int, str]`
2020
tuples_type_compat.py:162:6: error[invalid-assignment] Object of type `tuple[Literal[1], Literal[1], Literal[""]]` is not assignable to `tuple[int, *tuple[str, ...]]`
2121
tuples_type_compat.py:163:6: error[invalid-assignment] Object of type `tuple[Literal[1], Literal[""], Literal[1]]` is not assignable to `tuple[int, *tuple[str, ...]]`

0 commit comments

Comments
 (0)