Skip to content

Commit 2b960aa

Browse files
authored
Update ty conformance results for v0.0.70 (#2339)
* Update conformance for latest ty * Adjust configuration so ty reports `ambiguous-protocol-member` as an error * Remove obsolete notes from passing ty protocol result
1 parent 043e01d commit 2b960aa

24 files changed

Lines changed: 198 additions & 207 deletions

conformance/results/results.html

Lines changed: 4 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conformance/results/ty/aliases_implicit.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ aliases_implicit.py:77:9: error[not-subscriptable] Cannot subscript non-generic
1717
aliases_implicit.py:78:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
1818
aliases_implicit.py:79:29: error[invalid-type-arguments] Too many type arguments: expected 1, got 2
1919
aliases_implicit.py:80:24: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
20-
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `int | float` of type variable `TFloat@GoodTypeAlias12`
20+
aliases_implicit.py:81:25: error[invalid-type-arguments] Type `str` is not assignable to upper bound `float` of type variable `TFloat@GoodTypeAlias12`
2121
aliases_implicit.py:107:9: error[invalid-type-form] Variable of type `list[<class 'int'> | <class 'str'>]` is not allowed in a parameter annotation
2222
aliases_implicit.py:108:9: error[invalid-type-form] Variable of type `tuple[tuple[<class 'int'>, <class 'str'>]]` is not allowed in a parameter annotation
2323
aliases_implicit.py:109:9: error[invalid-type-form] Variable of type `list[<class 'int'>]` is not allowed in a parameter annotation

conformance/results/ty/callables_subtyping.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
callables_subtyping.py:26:36: error[invalid-assignment] Object of type `(int, /) -> int` is not assignable to `(int | float, /) -> int | float`
6-
callables_subtyping.py:29:32: error[invalid-assignment] Object of type `(int | float, /) -> int | float` is not assignable to `(int, /) -> int`
5+
callables_subtyping.py:26:36: error[invalid-assignment] Object of type `(int, /) -> int` is not assignable to `(float, /) -> float`
6+
callables_subtyping.py:29:32: error[invalid-assignment] Object of type `(float, /) -> float` is not assignable to `(int, /) -> int`
77
callables_subtyping.py:51:21: error[invalid-assignment] Object of type `PosOnly2` is not assignable to `Standard2`
88
callables_subtyping.py:52:21: error[invalid-assignment] Object of type `KwOnly2` is not assignable to `Standard2`
99
callables_subtyping.py:55:20: error[invalid-assignment] Object of type `KwOnly2` is not assignable to `PosOnly2`

conformance/results/ty/constructors_call_init.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Line 42: Expected 1 errors
99
Line 107: Expected 1 errors
1010
"""
1111
output = """
12-
constructors_call_init.py:21:13: error[invalid-argument-type] Argument to `Class1.__init__` is incorrect: Expected `int`, found `float`
12+
constructors_call_init.py:21:13: error[invalid-argument-type] Argument to `Class1.__init__` is incorrect: Expected `int`, found `float*`
1313
constructors_call_init.py:56:1: error[invalid-argument-type] Argument to `Class4.__init__` is incorrect: Expected `Class4[int]`, found `Class4[str]`
1414
constructors_call_init.py:130:9: error[too-many-positional-arguments] Too many positional arguments to `object.__init__`: expected 1, got 2
1515
"""

conformance/results/ty/constructors_call_new.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
constructors_call_new.py:21:13: error[invalid-argument-type] Argument to constructor `Class1.__new__` is incorrect: Expected `int`, found `float`
5+
constructors_call_new.py:21:13: error[invalid-argument-type] Argument to constructor `Class1.__new__` is incorrect: Expected `int`, found `float*`
66
constructors_call_new.py:148:1: error[invalid-argument-type] Argument to constructor `Class11.__new__` is incorrect: Expected `type[Class11[int]]`, found `<class 'Class11[str]'>`
77
"""

conformance/results/ty/dataclasses_transform_converter.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dataclasses_transform_converter.py:48:31: error[invalid-argument-type] Argument
66
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`
77
dataclasses_transform_converter.py:107:5: error[invalid-argument-type] Argument is incorrect: Expected `str`, found `Literal[1]`
88
dataclasses_transform_converter.py:108:23: error[invalid-argument-type] Argument is incorrect: Expected `str | bytes`, found `Literal[1]`
9-
dataclasses_transform_converter.py:109:29: error[invalid-argument-type] Argument is incorrect: Expected `str | list[str]`, found `complex`
9+
dataclasses_transform_converter.py:109:29: error[invalid-argument-type] Argument is incorrect: Expected `str | list[str]`, found `complex*`
1010
dataclasses_transform_converter.py:118:1: error[invalid-assignment] Object of type `Literal[1]` is not assignable to attribute `field0` of type `str`
1111
dataclasses_transform_converter.py:119:1: error[invalid-assignment] Object of type `Literal[1]` is not assignable to attribute `field3` of type `str | bytes`
1212
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`

conformance/results/ty/dataclasses_usage.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ errors_diff = """
33
"""
44
output = """
55
dataclasses_usage.py:51:6: error[missing-argument] No argument provided for required parameter `unit_price`
6-
dataclasses_usage.py:52:28: error[invalid-argument-type] Argument is incorrect: Expected `int | float`, found `Literal["price"]`
6+
dataclasses_usage.py:52:28: error[invalid-argument-type] Argument is incorrect: Expected `float`, found `Literal["price"]`
77
dataclasses_usage.py:53:36: error[too-many-positional-arguments] Too many positional arguments: expected 3, got 4
88
dataclasses_usage.py:62:5: error[dataclass-field-order] Required field `b` cannot be defined after fields with default values
99
dataclasses_usage.py:68:5: error[dataclass-field-order] Required field `b` cannot be defined after fields with default values

conformance/results/ty/generics_defaults.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Line 188: Expected 1 errors
1010
Line 144: Unexpected errors ['generics_defaults.py:144:61: error[invalid-type-form] `Unpack` can only unpack a tuple type or `TypeVarTuple`']
1111
Line 203: Unexpected errors ['generics_defaults.py:203:28: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`']
1212
Line 204: Unexpected errors ['generics_defaults.py:204:5: error[type-assertion-failure] Type `tuple[int]` does not match asserted type `tuple[int, str]`']
13-
Line 205: Unexpected errors ['generics_defaults.py:205:5: error[type-assertion-failure] Type `(...) -> None` does not match asserted type `(int | float, bool, /) -> None`']
13+
Line 205: Unexpected errors ['generics_defaults.py:205:5: error[type-assertion-failure] Type `(...) -> None` does not match asserted type `(float, bool, /) -> None`']
1414
"""
1515
output = """
1616
generics_defaults.py:24:40: error[invalid-generic-class] Type parameter `T` without a default cannot follow earlier parameter `DefaultStrT` with a default
@@ -21,5 +21,5 @@ generics_defaults.py:159:52: error[invalid-type-variable-default] TypeVar defaul
2121
generics_defaults.py:177:1: error[type-assertion-failure] Type `int` does not match asserted type `Any`
2222
generics_defaults.py:203:28: error[invalid-type-arguments] Type argument for `ParamSpec` must be either a list of types, `ParamSpec`, `Concatenate`, or `...`
2323
generics_defaults.py:204:5: error[type-assertion-failure] Type `tuple[int]` does not match asserted type `tuple[int, str]`
24-
generics_defaults.py:205:5: error[type-assertion-failure] Type `(...) -> None` does not match asserted type `(int | float, bool, /) -> None`
24+
generics_defaults.py:205:5: error[type-assertion-failure] Type `(...) -> None` does not match asserted type `(float, bool, /) -> None`
2525
"""

conformance/results/ty/generics_syntax_infer_variance.toml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ errors_diff = """
44
output = """
55
generics_syntax_infer_variance.py:15:6: error[invalid-legacy-type-variable] A `TypeVar` cannot specify variance when `infer_variance=True`
66
generics_syntax_infer_variance.py:17:6: error[invalid-legacy-type-variable] A `TypeVar` cannot specify variance when `infer_variance=True`
7-
generics_syntax_infer_variance.py:29:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[int | float]` is not assignable to `ShouldBeCovariant1[int]`
8-
generics_syntax_infer_variance.py:47:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[int | float]` is not assignable to `ShouldBeCovariant2[int]`
9-
generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[int | float]` is not assignable to `ShouldBeCovariant3[int]`
10-
generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[int | float]` is not assignable to `ShouldBeCovariant5[int]`
11-
generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[int | float]` is not assignable to `ShouldBeCovariant6[int]`
12-
generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[int | float]`
13-
generics_syntax_infer_variance.py:113:36: error[invalid-assignment] Object of type `ShouldBeInvariant1[int | float]` is not assignable to `ShouldBeInvariant1[int]`
14-
generics_syntax_infer_variance.py:127:38: error[invalid-assignment] Object of type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[int | float]`
15-
generics_syntax_infer_variance.py:128:36: error[invalid-assignment] Object of type `ShouldBeInvariant2[int | float]` is not assignable to `ShouldBeInvariant2[int]`
16-
generics_syntax_infer_variance.py:135:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[int | float, str]`
17-
generics_syntax_infer_variance.py:136:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[int | float, str]` is not assignable to `ShouldBeInvariant3[int, str]`
18-
generics_syntax_infer_variance.py:137:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, int | float]`
19-
generics_syntax_infer_variance.py:138:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int | float]` is not assignable to `ShouldBeInvariant3[str, int]`
20-
generics_syntax_infer_variance.py:146:38: error[invalid-assignment] Object of type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[int | float]`
21-
generics_syntax_infer_variance.py:154:38: error[invalid-assignment] Object of type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[int | float]`
22-
generics_syntax_infer_variance.py:165:45: error[invalid-assignment] Object of type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[int | float]`
7+
generics_syntax_infer_variance.py:29:35: error[invalid-assignment] Object of type `ShouldBeCovariant1[float]` is not assignable to `ShouldBeCovariant1[int]`
8+
generics_syntax_infer_variance.py:47:35: error[invalid-assignment] Object of type `ShouldBeCovariant2[float]` is not assignable to `ShouldBeCovariant2[int]`
9+
generics_syntax_infer_variance.py:56:35: error[invalid-assignment] Object of type `ShouldBeCovariant3[float]` is not assignable to `ShouldBeCovariant3[int]`
10+
generics_syntax_infer_variance.py:85:34: error[invalid-assignment] Object of type `ShouldBeCovariant5[float]` is not assignable to `ShouldBeCovariant5[int]`
11+
generics_syntax_infer_variance.py:96:34: error[invalid-assignment] Object of type `ShouldBeCovariant6[float]` is not assignable to `ShouldBeCovariant6[int]`
12+
generics_syntax_infer_variance.py:112:38: error[invalid-assignment] Object of type `ShouldBeInvariant1[int]` is not assignable to `ShouldBeInvariant1[float]`
13+
generics_syntax_infer_variance.py:113:36: error[invalid-assignment] Object of type `ShouldBeInvariant1[float]` is not assignable to `ShouldBeInvariant1[int]`
14+
generics_syntax_infer_variance.py:127:38: error[invalid-assignment] Object of type `ShouldBeInvariant2[int]` is not assignable to `ShouldBeInvariant2[float]`
15+
generics_syntax_infer_variance.py:128:36: error[invalid-assignment] Object of type `ShouldBeInvariant2[float]` is not assignable to `ShouldBeInvariant2[int]`
16+
generics_syntax_infer_variance.py:135:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[int, str]` is not assignable to `ShouldBeInvariant3[float, str]`
17+
generics_syntax_infer_variance.py:136:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[float, str]` is not assignable to `ShouldBeInvariant3[int, str]`
18+
generics_syntax_infer_variance.py:137:43: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, int]` is not assignable to `ShouldBeInvariant3[str, float]`
19+
generics_syntax_infer_variance.py:138:41: error[invalid-assignment] Object of type `ShouldBeInvariant3[str, float]` is not assignable to `ShouldBeInvariant3[str, int]`
20+
generics_syntax_infer_variance.py:146:38: error[invalid-assignment] Object of type `ShouldBeInvariant4[int]` is not assignable to `ShouldBeInvariant4[float]`
21+
generics_syntax_infer_variance.py:154:38: error[invalid-assignment] Object of type `ShouldBeInvariant5[int]` is not assignable to `ShouldBeInvariant5[float]`
22+
generics_syntax_infer_variance.py:165:45: error[invalid-assignment] Object of type `ShouldBeContravariant1[int]` is not assignable to `ShouldBeContravariant1[float]`
2323
"""

conformance/results/ty/generics_typevartuple_callable.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ notes = """
44
Does not correctly infer a `TypeVarTuple` that appears between fixed leading and trailing parameters in `*args`.
55
"""
66
errors_diff = """
7-
Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:5: error[type-assertion-failure] Type `tuple[Unknown, *tuple[Unknown, ...]]` does not match asserted type `tuple[int | float | complex, str, int | float]`']
7+
Line 50: Unexpected errors ['generics_typevartuple_callable.py:50:5: error[type-assertion-failure] Type `tuple[Unknown, *tuple[Unknown, ...]]` does not match asserted type `tuple[complex, str, float]`']
88
"""
99
output = """
1010
generics_typevartuple_callable.py:26:9: error[invalid-argument-type] Argument to `Process.__init__` is incorrect: Expected `(int | Literal[""], str | Literal[0], /) -> None`, found `def func1(arg1: int, arg2: str) -> None`
11-
generics_typevartuple_callable.py:50:5: error[type-assertion-failure] Type `tuple[Unknown, *tuple[Unknown, ...]]` does not match asserted type `tuple[int | float | complex, str, int | float]`
11+
generics_typevartuple_callable.py:50:5: error[type-assertion-failure] Type `tuple[Unknown, *tuple[Unknown, ...]]` does not match asserted type `tuple[complex, str, float]`
1212
"""

0 commit comments

Comments
 (0)