Skip to content

Commit ba68164

Browse files
authored
Update ty results for v0.0.30 (#2260)
1 parent 7349d23 commit ba68164

12 files changed

Lines changed: 42 additions & 48 deletions

conformance/results/results.html

Lines changed: 2 additions & 2 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.60.0</div>
182182
</th>
183-
<th class='tc-header'><div class='tc-name'>ty 0.0.29</div>
183+
<th class='tc-header'><div class='tc-name'>ty 0.0.30</div>
184184
</th>
185185
</tr>
186186
<tr><th class="column" colspan="6">
@@ -1079,7 +1079,7 @@ <h3>Python Type System Conformance Test Results</h3>
10791079
<th class="column col2 conformant">Pass</th>
10801080
<th class="column col2 conformant">Pass</th>
10811081
<th class="column col2 conformant">Pass</th>
1082-
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Does not detect runtime errors from attempting to delete namedtuple attributes.</p></span></div></th>
1082+
<th class="column col2 conformant">Pass</th>
10831083
</tr>
10841084
<tr><th class="column" colspan="6">
10851085
<a class="test_group" href="https://typing.readthedocs.io/en/latest/spec/enums.html">Enumerations</a>

conformance/results/ty/aliases_newtype.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ aliases_newtype.py:12:14: error[invalid-assignment] Object of type `Literal[42]`
77
aliases_newtype.py:18:11: error[invalid-assignment] Object of type `<NewType pseudo-class 'UserId'>` is not assignable to `type`
88
aliases_newtype.py:23:16: error[invalid-argument-type] Argument to function `isinstance` is incorrect: Expected `type | UnionType | tuple[Divergent, ...]`, found `<NewType pseudo-class 'UserId'>`
99
aliases_newtype.py:26:21: error[invalid-base] Cannot subclass an instance of NewType
10-
aliases_newtype.py:35:1: error[invalid-newtype] The name of a `NewType` (`BadName`) must match the name of the variable it is assigned to (`GoodName`)
10+
aliases_newtype.py:35:20: error[mismatched-type-name] The name passed to `NewType` must match the variable it is assigned to: Expected "GoodName", got "BadName"
1111
aliases_newtype.py:41:6: error[invalid-type-form] `GoodNewType1` is a `NewType` and cannot be specialized
1212
aliases_newtype.py:47:38: error[invalid-newtype] invalid base for `typing.NewType`: type `int | str`
1313
aliases_newtype.py:50:38: error[invalid-newtype] invalid base for `typing.NewType`: A `NewType` base cannot be generic

conformance/results/ty/dataclasses_final.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
dataclasses_final.py:27:1: error[invalid-assignment] Cannot assign to final attribute `final_classvar` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body or `__init__`
6-
dataclasses_final.py:35:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `D`: `Final` attributes can only be assigned in the class body or `__init__`
7-
dataclasses_final.py:36:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `D`: `Final` attributes can only be assigned in the class body or `__init__`
8-
dataclasses_final.py:37:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body or `__init__`
9-
dataclasses_final.py:38:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body or `__init__`
5+
dataclasses_final.py:27:1: error[invalid-assignment] Cannot assign to final attribute `final_classvar` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body, `__init__`, or `__post_init__` on dataclass-like classes
6+
dataclasses_final.py:35:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `D`: `Final` attributes can only be assigned in the class body, `__init__`, or `__post_init__` on dataclass-like classes
7+
dataclasses_final.py:36:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `D`: `Final` attributes can only be assigned in the class body, `__init__`, or `__post_init__` on dataclass-like classes
8+
dataclasses_final.py:37:1: error[invalid-assignment] Cannot assign to final attribute `final_no_default` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body, `__init__`, or `__post_init__` on dataclass-like classes
9+
dataclasses_final.py:38:1: error[invalid-assignment] Cannot assign to final attribute `final_with_default` on type `<class 'D'>`: `Final` attributes can only be assigned in the class body, `__init__`, or `__post_init__` on dataclass-like classes
1010
"""
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
conformance_automated = "Pass"
2-
conformant = "Pass"
3-
ignore_errors = ["Type `Unknown | tuple[()]` does not match asserted type `tuple[()]`"]
42
errors_diff = """
53
"""
64
output = """
75
dataclasses_match_args.py:42:1: error[unresolved-attribute] Class `DC4` has no attribute `__match_args__`
8-
dataclasses_match_args.py:49:1: error[type-assertion-failure] Type `Unknown | tuple[()]` does not match asserted type `tuple[()]`
96
"""

conformance/results/ty/enums_definition.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5+
enums_definition.py:24:32: error[too-many-positional-arguments] Too many positional arguments to function `Enum`: expected 2, got 4
6+
enums_definition.py:33:33: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
57
"""

conformance/results/ty/enums_members.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ enums_members.py:88:18: error[invalid-type-form] Type arguments for `Literal` mu
99
enums_members.py:89:16: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
1010
enums_members.py:120:1: error[type-assertion-failure] Type `int` does not match asserted type `Unknown`
1111
enums_members.py:120:32: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
12-
enums_members.py:132:21: info[revealed-type] Revealed type: `Unknown | Literal[2]`
13-
enums_members.py:133:9: error[type-assertion-failure] Type `Unknown | Literal[2]` does not match asserted type `Unknown`
12+
enums_members.py:132:21: info[revealed-type] Revealed type: `int`
13+
enums_members.py:133:9: error[type-assertion-failure] Type `int` does not match asserted type `Unknown`
1414
enums_members.py:133:43: error[invalid-type-form] Type arguments for `Literal` must be `None`, a literal value (int, bool, str, or bytes), or an enum member
15-
enums_members.py:150:1: error[type-assertion-failure] Type `Unknown | Literal[2]` does not match asserted type `int`
16-
enums_members.py:151:1: error[type-assertion-failure] Type `Unknown | Literal[3]` does not match asserted type `int`
1715
"""

conformance/results/ty/generics_paramspec_basic.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
generics_paramspec_basic.py:10:1: error[invalid-paramspec] The name of a `ParamSpec` (`NotIt`) must match the name of the variable it is assigned to (`WrongName`)
6-
generics_paramspec_basic.py:15:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
7-
generics_paramspec_basic.py:23:14: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
8-
generics_paramspec_basic.py:23:20: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
5+
generics_paramspec_basic.py:10:23: error[mismatched-type-name] The name passed to `ParamSpec` must match the variable it is assigned to: Expected "WrongName", got "NotIt"
6+
generics_paramspec_basic.py:15:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type alias value
7+
generics_paramspec_basic.py:23:14: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
8+
generics_paramspec_basic.py:23:20: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a return type annotation
99
generics_paramspec_basic.py:27:14: error[invalid-type-form] `typing.Concatenate` is not allowed in this context in a parameter annotation
1010
generics_paramspec_basic.py:31:19: error[invalid-type-arguments] ParamSpec `P` cannot be used to specialize type variable `_T`
11-
generics_paramspec_basic.py:35:35: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
12-
generics_paramspec_basic.py:39:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
13-
generics_paramspec_basic.py:39:31: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
11+
generics_paramspec_basic.py:35:35: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
12+
generics_paramspec_basic.py:39:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
13+
generics_paramspec_basic.py:39:31: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
1414
"""

conformance/results/ty/namedtuples_usage.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
conformance_automated = "Fail"
2-
conformant = "Partial"
3-
notes = """
4-
Does not detect runtime errors from attempting to delete namedtuple attributes.
5-
"""
1+
conformance_automated = "Pass"
62
errors_diff = """
7-
Line 42: Expected 1 errors
83
"""
94
output = """
105
namedtuples_usage.py:34:7: error[index-out-of-bounds] Index 3 is out of bounds for tuple `Point` with length 3
116
namedtuples_usage.py:35:7: error[index-out-of-bounds] Index -4 is out of bounds for tuple `Point` with length 3
127
namedtuples_usage.py:40:1: error[invalid-assignment] Cannot assign to read-only property `x` on object of type `Point`
138
namedtuples_usage.py:41:1: error[invalid-assignment] Cannot assign to a subscript on an object of type `Point`
9+
namedtuples_usage.py:42:5: error[invalid-assignment] Cannot delete read-only property `x` on object of type `Point`
1410
namedtuples_usage.py:43:5: error[not-subscriptable] Cannot delete subscript on object of type `Point` with no `__delitem__` method
1511
namedtuples_usage.py:52:1: error[invalid-assignment] Too many values to unpack: Expected 2
1612
namedtuples_usage.py:53:1: error[invalid-assignment] Not enough values to unpack: Expected 4

conformance/results/ty/typeddicts_alt_syntax.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ errors_diff = """
44
output = """
55
typeddicts_alt_syntax.py:23:44: error[invalid-argument-type] Expected a dict literal for parameter `fields` of `TypedDict()`
66
typeddicts_alt_syntax.py:27:45: error[invalid-argument-type] Expected a string-literal key in the `fields` dict of `TypedDict()`: Found `Literal[1]`
7-
typeddicts_alt_syntax.py:31:27: error[invalid-argument-type] TypedDict name must match the variable it is assigned to: Expected "BadTypedDict3", got "WrongName"
7+
typeddicts_alt_syntax.py:31:27: error[mismatched-type-name] The name passed to `TypedDict` must match the variable it is assigned to: Expected "BadTypedDict3", got "WrongName"
88
typeddicts_alt_syntax.py:35:72: error[unknown-argument] Argument `other` does not match any known parameter of function `TypedDict`
99
typeddicts_alt_syntax.py:41:10: error[missing-argument] No argument provided for required parameter `fields` of function `TypedDict`
1010
typeddicts_alt_syntax.py:41:30: error[unknown-argument] Argument `name` does not match any known parameter of function `TypedDict`
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "ty 0.0.29"
1+
version = "ty 0.0.30"

0 commit comments

Comments
 (0)