Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 12 additions & 10 deletions conformance/results/mypy/generics_typevartuple_args.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ notes = """
Does not enforce that tuples captured by TypeVarTuple are same type.
"""
output = """
generics_typevartuple_args.py:33: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type]
generics_typevartuple_args.py:34: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type]
generics_typevartuple_args.py:48: error: Argument 2 to "func1" has incompatible type "str"; expected "int" [arg-type]
generics_typevartuple_args.py:57: error: Argument 2 to "func2" has incompatible type "int"; expected "*tuple[*tuple[str, ...], str]" [arg-type]
generics_typevartuple_args.py:58: error: Too few arguments for "func2" [call-arg]
generics_typevartuple_args.py:59: error: Too few arguments for "func2" [call-arg]
generics_typevartuple_args.py:59: error: Argument 1 to "func2" has incompatible type "str"; expected "int" [arg-type]
generics_typevartuple_args.py:67: error: Too few arguments for "func3" [call-arg]
generics_typevartuple_args.py:35: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type]
generics_typevartuple_args.py:36: error: Argument 3 to "exec_le" has incompatible type "str"; expected "Env" [arg-type]
generics_typevartuple_args.py:50: error: Argument 2 to "func1" has incompatible type "str"; expected "int" [arg-type]
generics_typevartuple_args.py:59: error: Argument 2 to "func2" has incompatible type "int"; expected "*tuple[*tuple[str, ...], str]" [arg-type]
generics_typevartuple_args.py:60: error: Too few arguments for "func2" [call-arg]
generics_typevartuple_args.py:61: error: Too few arguments for "func2" [call-arg]
generics_typevartuple_args.py:61: error: Argument 1 to "func2" has incompatible type "str"; expected "int" [arg-type]
generics_typevartuple_args.py:69: error: Too few arguments for "func3" [call-arg]
"""
conformance_automated = "Fail"
errors_diff = """
Line 75: Expected 1 errors
Line 76: Expected 1 errors
Line 77: Expected 1 errors
Line 78: Expected 1 errors
Lines 20, 21: Expected error (tag 'args_to_tuple')
Lines 33, 34: Expected error (tag 'exec_le')
"""
6 changes: 4 additions & 2 deletions conformance/results/mypy/generics_typevartuple_callable.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
conformant = "Pass"
conformant = "Partial"
notes = "Does use assert_type in two different ways"
output = """
generics_typevartuple_callable.py:26: error: Argument "target" to "Process" has incompatible type "Callable[[int, str], None]"; expected "Callable[[str, int], None]" [arg-type]
"""
conformance_automated = "Pass"
conformance_automated = "Fail"
errors_diff = """
Lines 49, 50: Expected error (tag 'fun3')
"""
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/aliases_explicit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ errors_diff = """
"""
output = """
ERROR aliases_explicit.py:67:9-28: `TypeAlias[GoodTypeAlias2, type[int | None]]` is not subscriptable [unsupported-operation]
ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[GoodTypeAlias2]]]` is not subscriptable [unsupported-operation]
ERROR aliases_explicit.py:68:9-28: `TypeAlias[GoodTypeAlias3, type[list[int | None]]]` is not subscriptable [unsupported-operation]
ERROR aliases_explicit.py:69:9-33: Expected 1 type argument for `GoodTypeAlias4`, got 2 [bad-specialization]
ERROR aliases_explicit.py:70:9-33: Expected 1 type argument for `GoodTypeAlias8`, got 2 [bad-specialization]
ERROR aliases_explicit.py:71:9-33: Expected a valid ParamSpec expression, got `int` [invalid-param-spec]
Expand Down
1 change: 1 addition & 0 deletions conformance/results/pyrefly/aliases_recursive.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ ERROR aliases_recursive.py:63:30-43: `list[list[float] | str | GenericTypeAlias1
ERROR aliases_recursive.py:69:35-64: `list[int | list[int | list[int | list[float] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]] | str | GenericTypeAlias2[str, int]]` is not assignable to `list[int | str | GenericTypeAlias2[str, int]]` [bad-assignment]
ERROR aliases_recursive.py:72:29-57: Found cyclic self-reference in `RecursiveUnion` [invalid-type-alias]
ERROR aliases_recursive.py:75:31-61: Found cyclic self-reference in `MutualReference1` [invalid-type-alias]
ERROR aliases_recursive.py:75:93-123: Found cyclic self-reference in `MutualReference2` [invalid-type-alias]
"""
1 change: 1 addition & 0 deletions conformance/results/pyrefly/aliases_type_statement.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ ERROR aliases_type_statement.py:77:7-41: `str` is not assignable to upper bound
ERROR aliases_type_statement.py:79:7-41: `int` is not assignable to upper bound `str` of type variable `T` [bad-specialization]
ERROR aliases_type_statement.py:82:28-47: Found cyclic self-reference in `RecursiveTypeAlias3` [invalid-type-alias]
ERROR aliases_type_statement.py:84:31-59: Found cyclic self-reference in `RecursiveTypeAlias4` [invalid-type-alias]
ERROR aliases_type_statement.py:88:28-47: Found cyclic self-reference in `RecursiveTypeAlias6` [invalid-type-alias]
ERROR aliases_type_statement.py:89:28-47: Found cyclic self-reference in `RecursiveTypeAlias7` [invalid-type-alias]
"""
16 changes: 6 additions & 10 deletions conformance/results/pyrefly/aliases_typealiastype.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
conformant = "Partial"
notes = """
Does not detect circular definitions.
"""
conformance_automated = "Fail"
conformance_automated = "Pass"
errors_diff = """
Line 48: Expected 1 errors
Line 66: Expected 1 errors
"""
output = """
ERROR aliases_typealiastype.py:32:7-30: Object of class `TypeAliasType` has no attribute `other_attrib` [missing-attribute]
ERROR aliases_typealiastype.py:40:5-30: `int` is not assignable to upper bound `str` of type variable `TStr` [bad-specialization]
ERROR aliases_typealiastype.py:43:13-66: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
ERROR aliases_typealiastype.py:44:13-48: Type variable `S` is out of scope for this `TypeAliasType` [invalid-type-alias]
ERROR aliases_typealiastype.py:45:45-65: Value for argument `type_params` must be a tuple literal [invalid-type-alias]
ERROR aliases_typealiastype.py:46:41-50: Found cyclic self-reference in `BadAlias4` [invalid-type-alias]
ERROR aliases_typealiastype.py:47:40-60: Found cyclic self-reference in `BadAlias5` [invalid-type-alias]
ERROR aliases_typealiastype.py:49:40-49: Found cyclic self-reference in `BadAlias7` [invalid-type-alias]
ERROR aliases_typealiastype.py:46:13-52: Found cyclic self-reference in `BadAlias4` [invalid-type-alias]
ERROR aliases_typealiastype.py:47:13-79: Found cyclic self-reference in `BadAlias5` [invalid-type-alias]
ERROR aliases_typealiastype.py:48:13-52: Found cyclic self-reference in `BadAlias6` [invalid-type-alias]
ERROR aliases_typealiastype.py:49:13-50: Found cyclic self-reference in `BadAlias7` [invalid-type-alias]
ERROR aliases_typealiastype.py:52:40-80: Function call cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:53:40-50: List literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:54:42-55: Tuple literal cannot be used in annotations [invalid-annotation]
Expand All @@ -31,4 +26,5 @@ ERROR aliases_typealiastype.py:61:42-46: Bool literal cannot be used in annotati
ERROR aliases_typealiastype.py:62:42-43: Number literal cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:63:42-53: Boolean operation cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:64:42-52: F-string cannot be used in annotations [invalid-annotation]
ERROR aliases_typealiastype.py:66:14-59: Found cyclic self-reference in `BadAlias21` [invalid-type-alias]
"""
8 changes: 4 additions & 4 deletions conformance/results/pyrefly/generics_scoping.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ Does not implement several scoping checks/restrictions for generics
"""
conformance_automated = "Fail"
errors_diff = """
Line 61: Expected 1 errors
Line 65: Expected 1 errors
Line 86: Expected 1 errors
Line 89: Expected 1 errors
Line 98: Expected 1 errors
Line 105: Expected 1 errors
Line 106: Expected 1 errors
Line 107: Expected 1 errors
"""
output = """
Expand All @@ -19,5 +15,9 @@ ERROR generics_scoping.py:20:12-38: assert_type(str, Literal['a']) failed [asser
ERROR generics_scoping.py:34:10-13: Argument `Literal['a']` is not assignable to parameter `x` with type `int` in function `MyClass.meth_2` [bad-argument-type]
ERROR generics_scoping.py:50:12-48: assert_type(str, Literal['abc']) failed [assert-type]
ERROR generics_scoping.py:54:12-50: assert_type(bytes, Literal[b'abc']) failed [assert-type]
ERROR generics_scoping.py:61:8-15: Type variable `S` is not in scope [invalid-type-var]
ERROR generics_scoping.py:65:14-21: Type variable `S` is not in scope [invalid-type-var]
ERROR generics_scoping.py:76:11-20: Redundant type parameter declaration [invalid-type-var]
ERROR generics_scoping.py:105:14-15: Type variable `T` is not in scope [invalid-type-var]
ERROR generics_scoping.py:106:14-21: Type variable `T` is not in scope [invalid-type-var]
"""
20 changes: 11 additions & 9 deletions conformance/results/pyrefly/generics_typevartuple_args.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ conformance_automated = "Pass"
errors_diff = """
"""
output = """
ERROR generics_typevartuple_args.py:33:8-19: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type]
ERROR generics_typevartuple_args.py:34:8-30: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type]
ERROR generics_typevartuple_args.py:48:6-17: Unpacked argument `tuple[Literal[1], Literal['2'], Literal[3]]` is not assignable to parameter `*args` with type `tuple[int, ...]` in function `func1` [bad-argument-type]
ERROR generics_typevartuple_args.py:57:6-16: Unpacked argument `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type]
ERROR generics_typevartuple_args.py:58:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type]
ERROR generics_typevartuple_args.py:59:6-10: Unpacked argument `tuple[Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type]
ERROR generics_typevartuple_args.py:67:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, str]` in function `func3` [bad-argument-type]
ERROR generics_typevartuple_args.py:75:13-19: Argument `tuple[Literal[1], Literal[2]]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type]
ERROR generics_typevartuple_args.py:76:13-19: Argument `tuple[Literal['1']]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type]
ERROR generics_typevartuple_args.py:21:12-68: assert_type(tuple[int, str], tuple[Literal[1], Literal['a']]) failed [assert-type]
ERROR generics_typevartuple_args.py:34:12-71: assert_type(tuple[int, str], tuple[Literal[0], Literal['']]) failed [assert-type]
ERROR generics_typevartuple_args.py:35:8-19: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type]
ERROR generics_typevartuple_args.py:36:8-30: Unpacked argument `tuple[Literal[0], Literal['']]` is not assignable to parameter `*args` with type `tuple[*@_, Env]` in function `exec_le` [bad-argument-type]
ERROR generics_typevartuple_args.py:50:6-17: Unpacked argument `tuple[Literal[1], Literal['2'], Literal[3]]` is not assignable to parameter `*args` with type `tuple[int, ...]` in function `func1` [bad-argument-type]
ERROR generics_typevartuple_args.py:59:6-16: Unpacked argument `tuple[Literal[1], Literal[1], Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type]
ERROR generics_typevartuple_args.py:60:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type]
ERROR generics_typevartuple_args.py:61:6-10: Unpacked argument `tuple[Literal['']]` is not assignable to parameter `*args` with type `tuple[int, *tuple[str, ...], str]` in function `func2` [bad-argument-type]
ERROR generics_typevartuple_args.py:69:6-9: Unpacked argument `tuple[Literal[1]]` is not assignable to parameter `*args` with type `tuple[int, str]` in function `func3` [bad-argument-type]
ERROR generics_typevartuple_args.py:77:13-19: Argument `tuple[Literal[1], Literal[2]]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type]
ERROR generics_typevartuple_args.py:78:13-19: Argument `tuple[Literal['1']]` is not assignable to parameter `*args` with type `tuple[int]` in function `func4` [bad-argument-type]
"""
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ errors_diff = """
"""
output = """
ERROR generics_typevartuple_callable.py:26:28-35: Argument `tuple[Literal[''], Literal[0]]` is not assignable to parameter `args` with type `tuple[int, str]` in function `Process.__init__` [bad-argument-type]
ERROR generics_typevartuple_callable.py:50:12-71: assert_type(tuple[float, str, complex], tuple[float, Literal[''], complex]) failed [assert-type]
"""
2 changes: 1 addition & 1 deletion conformance/results/pyrefly/version.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "pyrefly 0.53.0"
version = "pyrefly 0.54.0"
20 changes: 11 additions & 9 deletions conformance/results/pyright/generics_typevartuple_args.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
conformant = "Pass"
output = """
generics_typevartuple_args.py:33:16 - error: Argument of type "Literal['']" cannot be assigned to parameter of type "Env" in function "exec_le"
generics_typevartuple_args.py:21:13 - error: "assert_type" mismatch: expected "tuple[Literal[1], Literal['a']]" but received "tuple[int, str]" (reportAssertTypeFailure)
generics_typevartuple_args.py:34:13 - error: "assert_type" mismatch: expected "tuple[Literal[0], Literal['']]" but received "tuple[int, str]" (reportAssertTypeFailure)
generics_typevartuple_args.py:35:16 - error: Argument of type "Literal['']" cannot be assigned to parameter of type "Env" in function "exec_le"
  "Literal['']" is not assignable to "Env" (reportArgumentType)
generics_typevartuple_args.py:34:16 - error: Argument of type "Literal['']" cannot be assigned to parameter of type "Env" in function "exec_le"
generics_typevartuple_args.py:36:16 - error: Argument of type "Literal['']" cannot be assigned to parameter of type "Env" in function "exec_le"
  "Literal['']" is not assignable to "Env" (reportArgumentType)
generics_typevartuple_args.py:48:10 - error: Argument of type "Literal['2']" cannot be assigned to parameter of type "int" in function "func1"
generics_typevartuple_args.py:50:10 - error: Argument of type "Literal['2']" cannot be assigned to parameter of type "int" in function "func1"
  "Literal['2']" is not assignable to "int" (reportArgumentType)
generics_typevartuple_args.py:57:10 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str" in function "func2"
generics_typevartuple_args.py:59:10 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str" in function "func2"
  "Literal[1]" is not assignable to "str" (reportArgumentType)
generics_typevartuple_args.py:58:1 - error: Argument missing for parameter "args[2]" (reportCallIssue)
generics_typevartuple_args.py:59:1 - error: Argument missing for parameter "args[2]" (reportCallIssue)
generics_typevartuple_args.py:67:1 - error: Argument missing for parameter "args[1]" (reportCallIssue)
generics_typevartuple_args.py:75:13 - error: Argument of type "tuple[Literal[1], Literal[2]]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"
generics_typevartuple_args.py:60:1 - error: Argument missing for parameter "args[2]" (reportCallIssue)
generics_typevartuple_args.py:61:1 - error: Argument missing for parameter "args[2]" (reportCallIssue)
generics_typevartuple_args.py:69:1 - error: Argument missing for parameter "args[1]" (reportCallIssue)
generics_typevartuple_args.py:77:13 - error: Argument of type "tuple[Literal[1], Literal[2]]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"
  "tuple[Literal[1], Literal[2]]" is not assignable to "tuple[int]"
    Tuple size mismatch; expected 1 but received 2 (reportArgumentType)
generics_typevartuple_args.py:76:14 - error: Argument of type "tuple[Literal['1']]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"
generics_typevartuple_args.py:78:14 - error: Argument of type "tuple[Literal['1']]" cannot be assigned to parameter "args" of type "tuple[*Ts@func4]" in function "func4"
  "Literal['1']" is not assignable to "int" (reportArgumentType)
"""
conformance_automated = "Pass"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ output = """
generics_typevartuple_callable.py:26:28 - error: Argument of type "tuple[Literal[''], Literal[0]]" cannot be assigned to parameter "args" of type "tuple[*Ts@__init__]" in function "__init__"
  "Literal['']" is not assignable to "int"
  "Literal[0]" is not assignable to "str" (reportArgumentType)
generics_typevartuple_callable.py:50:13 - error: "assert_type" mismatch: expected "tuple[float, Literal[''], complex]" but received "tuple[float, str, complex]" (reportAssertTypeFailure)
"""
conformance_automated = "Pass"
errors_diff = """
Expand Down
10 changes: 5 additions & 5 deletions conformance/results/results.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ <h3>Python Type System Conformance Test Results</h3>
</th>
<th class='tc-header'><div class='tc-name'>pyright 1.1.408</div>
</th>
<th class='tc-header'><div class='tc-name'>zuban 0.6.0</div>
<th class='tc-header'><div class='tc-name'>zuban 0.6.1</div>
</th>
<th class='tc-header'><div class='tc-name'>pyrefly 0.53.0</div>
<th class='tc-header'><div class='tc-name'>pyrefly 0.54.0</div>
</th>
</tr>
<tr><th class="column" colspan="5">
Expand Down Expand Up @@ -307,7 +307,7 @@ <h3>Python Type System Conformance Test Results</h3>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_scoping</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 partially-conformant">Partial</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 implement several scoping checks/restrictions for generics</p></span></div></th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_self_advanced</th>
Expand Down Expand Up @@ -383,7 +383,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>TypeVarTuple is pinned too early when calling generic function</p></span></div></th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generics_typevartuple_callable</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 use assert_type in two different ways</p></span></div></th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
<th class="column col2 conformant">Pass</th>
Expand Down Expand Up @@ -503,7 +503,7 @@ <h3>Python Type System Conformance Test Results</h3>
<th class="column col2 partially-conformant"><div class="hover-text">Partial<span class="tooltip-text" id="bottom"><p>Incorrectly rejects some recursive type aliases using TypeAliasType.</p><p>Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.</p></span></div></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 circular definitions.</p></span></div></th>
<th class="column col2 conformant">Pass</th>
</tr>
<tr><th class="column col1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aliases_variance</th>
<th class="column col2 conformant">Pass</th>
Expand Down
Loading