Skip to content

Commit 8bcb4d9

Browse files
committed
conformance: update results
1 parent 273a90a commit 8bcb4d9

File tree

9 files changed

+51
-37
lines changed

9 files changed

+51
-37
lines changed
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Incorrectly allows variance on contrained type variables
4+
"""
25
output = """
36
generics_basic.py:40: error: Value of type variable "AnyStr" of "concat" cannot be "Sequence[object]" [type-var]
47
generics_basic.py:41: error: Value of type variable "AnyStr" of "concat" cannot be "Sequence[object]" [type-var]
58
generics_basic.py:49: error: Type variable must have at least two constrained types [misc]
69
generics_basic.py:55: error: TypeVar constraint type cannot be parametrized by type variables [misc]
710
generics_basic.py:69: error: Value of type variable "AnyStr" of "concat" cannot be "Sequence[object]" [type-var]
8-
generics_basic.py:121: error: Duplicate type variables in Generic[...] or Protocol[...] [misc]
9-
generics_basic.py:157: error: Invalid index type "int" for "MyMap1[str, int]"; expected type "str" [index]
10-
generics_basic.py:158: error: Invalid index type "int" for "MyMap2[int, str]"; expected type "str" [index]
11-
generics_basic.py:162: error: Free type variable expected in Generic[...] [misc]
12-
generics_basic.py:163: error: Free type variable expected in Protocol[...] [misc]
13-
generics_basic.py:171: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc]
11+
generics_basic.py:122: error: Duplicate type variables in Generic[...] or Protocol[...] [misc]
12+
generics_basic.py:158: error: Invalid index type "int" for "MyMap1[str, int]"; expected type "str" [index]
13+
generics_basic.py:159: error: Invalid index type "int" for "MyMap2[int, str]"; expected type "str" [index]
14+
generics_basic.py:163: error: Free type variable expected in Generic[...] [misc]
15+
generics_basic.py:164: error: Free type variable expected in Protocol[...] [misc]
1416
generics_basic.py:172: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc]
15-
generics_basic.py:208: error: Dynamic metaclass not supported for "GenericMetaInstance" [misc]
16-
generics_basic.py:208: error: Type variable "generics_basic.T" is unbound [valid-type]
17-
generics_basic.py:208: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class)
18-
generics_basic.py:208: note: (Hint: Use "T" in function signature to bind "T" inside a function)
17+
generics_basic.py:173: error: If Generic[...] or Protocol[...] is present it should list all type variables [misc]
18+
generics_basic.py:209: error: Dynamic metaclass not supported for "GenericMetaInstance" [misc]
19+
generics_basic.py:209: error: Type variable "generics_basic.T" is unbound [valid-type]
20+
generics_basic.py:209: note: (Hint: Use "Generic[T]" or "Protocol[T]" base class to bind "T" inside a class)
21+
generics_basic.py:209: note: (Hint: Use "T" in function signature to bind "T" inside a function)
1922
"""
20-
conformance_automated = "Pass"
23+
conformance_automated = "Fail"
2124
errors_diff = """
25+
Line 75: Expected 1 errors
2226
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "mypy 1.15.0"
2-
test_duration = 1.5
2+
test_duration = 2.1

conformance/results/pyright/aliases_typealiastype.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ aliases_typealiastype.py:61:42 - error: Expected class but received "Literal[Tru
3131
aliases_typealiastype.py:62:42 - error: Expected class but received "Literal[1]" (reportGeneralTypeIssues)
3232
aliases_typealiastype.py:63:42 - error: Binary operator not allowed in type expression (reportInvalidTypeForm)
3333
aliases_typealiastype.py:64:42 - error: Type expressions cannot use format string literals (f-strings) (reportGeneralTypeIssues)
34+
aliases_typealiastype.py:66:47 - error: "BadAlias21" is not defined (reportUndefinedVariable)
3435
"""
35-
conformance_automated = "Fail"
36+
conformance_automated = "Pass"
3637
errors_diff = """
37-
Line 66: Expected 1 errors
3838
"""

conformance/results/pyright/callables_protocol.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@ callables_protocol.py:70:7 - error: Type "(**b: str) -> None" is not assignable
3232
  Type "(**b: str) -> None" is not assignable to type "(*vals: bytes, **kwargs: str) -> None"
3333
    Parameter "*vals" has no corresponding parameter (reportAssignmentType)
3434
callables_protocol.py:97:16 - error: Type "(x: int) -> None" is not assignable to declared type "Proto4"
35-
  "function" is incompatible with protocol "Proto4"
36-
    "other_attribute" is not present
37-
    "__call__" is not present (reportAssignmentType)
35+
  "FunctionType" is incompatible with protocol "Proto4"
36+
    "other_attribute" is not present (reportAssignmentType)
3837
callables_protocol.py:121:18 - error: Type "(*vals: bytes, max_len: int | None = None) -> list[bytes]" is not assignable to declared type "NotProto6"
39-
  "function" is not assignable to "NotProto6" (reportAssignmentType)
38+
  "FunctionType" is not assignable to "NotProto6" (reportAssignmentType)
4039
callables_protocol.py:169:7 - error: Type "(x: int) -> Any" is not assignable to declared type "Proto8"
4140
  One or more overloads of "__call__" is not assignable
4241
    Type "(x: int) -> Any" is not assignable to type "(x: str) -> str"
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
conformant = "Pass"
1+
conformant = "Partial"
2+
notes = """
3+
Incorrectly allows variance on contrained type variables
4+
"""
25
output = """
36
generics_basic.py:40:15 - error: Argument of type "bytes" cannot be assigned to parameter "y" of type "AnyStr@concat" in function "concat"
47
  "bytes" is not assignable to "str" (reportArgumentType)
@@ -8,19 +11,20 @@ generics_basic.py:49:44 - error: TypeVar must have at least two constrained type
811
generics_basic.py:55:53 - error: TypeVar constraint type cannot be generic (reportGeneralTypeIssues)
912
generics_basic.py:69:15 - error: Argument of type "bytes" cannot be assigned to parameter "y" of type "AnyStr@concat" in function "concat"
1013
  "bytes" is not assignable to "str" (reportArgumentType)
11-
generics_basic.py:121:24 - error: Type arguments for "Generic" must be unique (reportInvalidTypeForm)
12-
generics_basic.py:157:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"
13-
  "Literal[0]" is not assignable to "str" (reportArgumentType)
14+
generics_basic.py:122:24 - error: Type arguments for "Generic" must be unique (reportInvalidTypeForm)
1415
generics_basic.py:158:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"
1516
  "Literal[0]" is not assignable to "str" (reportArgumentType)
16-
generics_basic.py:162:20 - error: Type argument for "Generic" must be a type variable (reportInvalidTypeForm)
17-
generics_basic.py:163:21 - error: Type argument for "Protocol" must be a type parameter (reportInvalidTypeForm)
18-
generics_basic.py:171:7 - error: Generic[] or Protocol[] must include all type variables
19-
  Missing type variables: "T_co" (reportGeneralTypeIssues)
17+
generics_basic.py:159:5 - error: Argument of type "Literal[0]" cannot be assigned to parameter "key" of type "str" in function "__getitem__"
18+
  "Literal[0]" is not assignable to "str" (reportArgumentType)
19+
generics_basic.py:163:20 - error: Type argument for "Generic" must be a type variable (reportInvalidTypeForm)
20+
generics_basic.py:164:21 - error: Type argument for "Protocol" must be a type parameter (reportInvalidTypeForm)
2021
generics_basic.py:172:7 - error: Generic[] or Protocol[] must include all type variables
2122
  Missing type variables: "T_co" (reportGeneralTypeIssues)
22-
generics_basic.py:208:37 - error: Metaclass cannot be generic (reportGeneralTypeIssues)
23+
generics_basic.py:173:7 - error: Generic[] or Protocol[] must include all type variables
24+
  Missing type variables: "T_co" (reportGeneralTypeIssues)
25+
generics_basic.py:209:37 - error: Metaclass cannot be generic (reportGeneralTypeIssues)
2326
"""
24-
conformance_automated = "Pass"
27+
conformance_automated = "Fail"
2528
errors_diff = """
29+
Line 75: Expected 1 errors
2630
"""

conformance/results/pyright/generics_syntax_infer_variance.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ generics_syntax_infer_variance.py:29:35 - error: Type "ShouldBeCovariant1[float]
66
  "ShouldBeCovariant1[float]" is not assignable to "ShouldBeCovariant1[int]"
77
    Type parameter "T@ShouldBeCovariant1" is covariant, but "float" is not a subtype of "int"
88
      "float" is not assignable to "int" (reportAssignmentType)
9+
generics_syntax_infer_variance.py:36:37 - error: Cannot instantiate abstract class "ShouldBeCovariant2"
10+
  "Collection.__len__" is not implemented
11+
  "Sequence.__getitem__" is not implemented (reportAbstractUsage)
12+
generics_syntax_infer_variance.py:37:35 - error: Cannot instantiate abstract class "ShouldBeCovariant2"
13+
  "Collection.__len__" is not implemented
14+
  "Sequence.__getitem__" is not implemented (reportAbstractUsage)
915
generics_syntax_infer_variance.py:37:35 - error: Type "ShouldBeCovariant2[float]" is not assignable to declared type "ShouldBeCovariant2[int]"
1016
  "ShouldBeCovariant2[float]" is not assignable to "ShouldBeCovariant2[int]"
1117
    Type parameter "T@ShouldBeCovariant2" is covariant, but "float" is not a subtype of "int"
@@ -57,6 +63,7 @@ generics_syntax_infer_variance.py:155:45 - error: Type "ShouldBeContravariant1[i
5763
    Type parameter "T@ShouldBeContravariant1" is contravariant, but "int" is not a supertype of "float"
5864
      "float" is not assignable to "int" (reportAssignmentType)
5965
"""
60-
conformance_automated = "Pass"
66+
conformance_automated = "Fail"
6167
errors_diff = """
68+
Line 36: Unexpected errors ['generics_syntax_infer_variance.py:36:37 - error: Cannot instantiate abstract class "ShouldBeCovariant2"']
6269
"""

conformance/results/pyright/protocols_definition.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protocols_definition.py:160:22 - error: Type "Concrete3_Bad5" is not assignable
4646
protocols_definition.py:218:22 - error: Type "Concrete4_Bad1" is not assignable to declared type "Template4"
4747
  "Concrete4_Bad1" is incompatible with protocol "Template4"
4848
    "val1" is an incompatible type
49-
      "function" is not assignable to "Sequence[float]" (reportAssignmentType)
49+
      "FunctionType" is not assignable to "Sequence[float]" (reportAssignmentType)
5050
protocols_definition.py:219:22 - error: Type "Concrete4_Bad2" is not assignable to declared type "Template4"
5151
  "Concrete4_Bad2" is incompatible with protocol "Template4"
5252
    "val1" is not present (reportAssignmentType)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "pyright 1.1.400"
2-
test_duration = 1.1
1+
version = "pyright 1.1.401"
2+
test_duration = 1.0

conformance/results/results.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ <h3>Python Type System Conformance Test Results</h3>
159159
<div class="table_container"><table><tbody>
160160
<tr><th class="col1">&nbsp;</th>
161161
<th class='tc-header'><div class='tc-name'>mypy 1.15.0</div>
162-
<div class='tc-time'>1.5sec</div>
162+
<div class='tc-time'>2.1sec</div>
163163
</th>
164-
<th class='tc-header'><div class='tc-name'>pyright 1.1.400</div>
165-
<div class='tc-time'>1.1sec</div>
164+
<th class='tc-header'><div class='tc-name'>pyright 1.1.401</div>
165+
<div class='tc-time'>1.0sec</div>
166166
</th>
167167
<th class='tc-header'><div class='tc-name'>pyre 0.9.23</div>
168-
<div class='tc-time'>10.7sec</div>
168+
<div class='tc-time'>0.6sec</div>
169169
</th>
170170
</tr>
171171
<tr><th class="column" colspan="4">

0 commit comments

Comments
 (0)