Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pyrefly 0.60.0</div>
</th>
<th class='tc-header'><div class='tc-name'>ty 0.0.29</div>
<th class='tc-header'><div class='tc-name'>ty 0.0.30</div>
</th>
</tr>
<tr><th class="column" colspan="6">
Expand Down Expand Up @@ -1079,7 +1079,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<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>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column" colspan="6">
<a class="test_group" href="https://typing.readthedocs.io/en/latest/spec/enums.html">Enumerations</a>
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/ty/aliases_newtype.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ aliases_newtype.py:12:14: error[invalid-assignment] Object of type `Literal[42]`
aliases_newtype.py:18:11: error[invalid-assignment] Object of type `<NewType pseudo-class 'UserId'>` is not assignable to `type`
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'>`
aliases_newtype.py:26:21: error[invalid-base] Cannot subclass an instance of NewType
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`)
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"
aliases_newtype.py:41:6: error[invalid-type-form] `GoodNewType1` is a `NewType` and cannot be specialized
aliases_newtype.py:47:38: error[invalid-newtype] invalid base for `typing.NewType`: type `int | str`
aliases_newtype.py:50:38: error[invalid-newtype] invalid base for `typing.NewType`: A `NewType` base cannot be generic
Expand Down
10 changes: 5 additions & 5 deletions conformance/results/ty/dataclasses_final.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
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__`
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__`
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__`
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__`
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__`
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
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
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
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
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
"""
3 changes: 0 additions & 3 deletions conformance/results/ty/dataclasses_match_args.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
conformance_automated = "Pass"
conformant = "Pass"
ignore_errors = ["Type `Unknown | tuple[()]` does not match asserted type `tuple[()]`"]
errors_diff = """
"""
output = """
dataclasses_match_args.py:42:1: error[unresolved-attribute] Class `DC4` has no attribute `__match_args__`
dataclasses_match_args.py:49:1: error[type-assertion-failure] Type `Unknown | tuple[()]` does not match asserted type `tuple[()]`
"""
2 changes: 2 additions & 0 deletions conformance/results/ty/enums_definition.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
enums_definition.py:24:32: error[too-many-positional-arguments] Too many positional arguments to function `Enum`: expected 2, got 4
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
"""
6 changes: 2 additions & 4 deletions conformance/results/ty/enums_members.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ enums_members.py:88:18: error[invalid-type-form] Type arguments for `Literal` mu
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
enums_members.py:120:1: error[type-assertion-failure] Type `int` does not match asserted type `Unknown`
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
enums_members.py:132:21: info[revealed-type] Revealed type: `Unknown | Literal[2]`
enums_members.py:133:9: error[type-assertion-failure] Type `Unknown | Literal[2]` does not match asserted type `Unknown`
enums_members.py:132:21: info[revealed-type] Revealed type: `int`
enums_members.py:133:9: error[type-assertion-failure] Type `int` does not match asserted type `Unknown`
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
enums_members.py:150:1: error[type-assertion-failure] Type `Unknown | Literal[2]` does not match asserted type `int`
enums_members.py:151:1: error[type-assertion-failure] Type `Unknown | Literal[3]` does not match asserted type `int`
"""
14 changes: 7 additions & 7 deletions conformance/results/ty/generics_paramspec_basic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
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`)
generics_paramspec_basic.py:15:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
generics_paramspec_basic.py:23:14: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
generics_paramspec_basic.py:23:20: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
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"
generics_paramspec_basic.py:15:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type alias value
generics_paramspec_basic.py:23:14: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
generics_paramspec_basic.py:23:20: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a return type annotation
generics_paramspec_basic.py:27:14: error[invalid-type-form] `typing.Concatenate` is not allowed in this context in a parameter annotation
generics_paramspec_basic.py:31:19: error[invalid-type-arguments] ParamSpec `P` cannot be used to specialize type variable `_T`
generics_paramspec_basic.py:35:35: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
generics_paramspec_basic.py:39:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
generics_paramspec_basic.py:39:31: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a type expression
generics_paramspec_basic.py:35:35: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
generics_paramspec_basic.py:39:18: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
generics_paramspec_basic.py:39:31: error[invalid-type-form] Bare ParamSpec `P` is not valid in this context in a parameter annotation
"""
8 changes: 2 additions & 6 deletions conformance/results/ty/namedtuples_usage.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
conformance_automated = "Fail"
conformant = "Partial"
notes = """
Does not detect runtime errors from attempting to delete namedtuple attributes.
"""
conformance_automated = "Pass"
errors_diff = """
Line 42: Expected 1 errors
"""
output = """
namedtuples_usage.py:34:7: error[index-out-of-bounds] Index 3 is out of bounds for tuple `Point` with length 3
namedtuples_usage.py:35:7: error[index-out-of-bounds] Index -4 is out of bounds for tuple `Point` with length 3
namedtuples_usage.py:40:1: error[invalid-assignment] Cannot assign to read-only property `x` on object of type `Point`
namedtuples_usage.py:41:1: error[invalid-assignment] Cannot assign to a subscript on an object of type `Point`
namedtuples_usage.py:42:5: error[invalid-assignment] Cannot delete read-only property `x` on object of type `Point`
namedtuples_usage.py:43:5: error[not-subscriptable] Cannot delete subscript on object of type `Point` with no `__delitem__` method
namedtuples_usage.py:52:1: error[invalid-assignment] Too many values to unpack: Expected 2
namedtuples_usage.py:53:1: error[invalid-assignment] Not enough values to unpack: Expected 4
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/ty/typeddicts_alt_syntax.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ errors_diff = """
output = """
typeddicts_alt_syntax.py:23:44: error[invalid-argument-type] Expected a dict literal for parameter `fields` of `TypedDict()`
typeddicts_alt_syntax.py:27:45: error[invalid-argument-type] Expected a string-literal key in the `fields` dict of `TypedDict()`: Found `Literal[1]`
typeddicts_alt_syntax.py:31:27: error[invalid-argument-type] TypedDict name must match the variable it is assigned to: Expected "BadTypedDict3", got "WrongName"
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"
typeddicts_alt_syntax.py:35:72: error[unknown-argument] Argument `other` does not match any known parameter of function `TypedDict`
typeddicts_alt_syntax.py:41:10: error[missing-argument] No argument provided for required parameter `fields` of function `TypedDict`
typeddicts_alt_syntax.py:41:30: error[unknown-argument] Argument `name` does not match any known parameter of function `TypedDict`
Expand Down
2 changes: 1 addition & 1 deletion conformance/results/ty/version.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "ty 0.0.29"
version = "ty 0.0.30"
1 change: 1 addition & 0 deletions conformance/tests/ty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ invalid-legacy-positional-parameter = "error"
redundant-final-classvar = "error"
assert-type-unspellable-subtype = "ignore"
invalid-enum-member-annotation = "error"
mismatched-type-name = "error"
Loading