Skip to content

Commit 9648576

Browse files
authored
Updated conformance results for pyright 1.1.374. (#1827)
This release included a fix for a conformance issue in the `deprecated` test. All other output changes are due to updates to error messages and do not affect conformance results.
1 parent 55400b5 commit 9648576

13 files changed

+41
-37
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "mypy 1.11.0"
2-
test_duration = 1.2
1+
version = "mypy 1.11.1"
2+
test_duration = 1.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.22"
2-
test_duration = 2.6
2+
test_duration = 1.4

conformance/results/pyright/constructors_call_init.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ errors_diff = """
55
output = """
66
constructors_call_init.py:21:13 - error: Argument of type "float" cannot be assigned to parameter "x" of type "int" in function "__init__"
77
  "float" is incompatible with "int" (reportArgumentType)
8-
constructors_call_init.py:42:8 - error: Argument of type "Class2[int]" cannot be assigned to parameter "x" of type "Class3 | None" in function "__init__"
9-
  Type "Class2[int]" is incompatible with type "Class3 | None"
10-
    "Class2[int]" is incompatible with "Class3"
11-
    "Class2[int]" is incompatible with "None" (reportArgumentType)
8+
constructors_call_init.py:42:8 - error: Argument of type "Class2[Unknown]" cannot be assigned to parameter "x" of type "Class3 | None" in function "__init__"
9+
  Type "Class2[Unknown]" is incompatible with type "Class3 | None"
10+
    "Class2[Unknown]" is incompatible with "Class3"
11+
    "Class2[Unknown]" is incompatible with "None" (reportArgumentType)
1212
constructors_call_init.py:56:1 - error:
1313
  Could not bind method "__init__" because "Class4[str]" is not assignable to parameter "self"
1414
    "Class4[str]" is incompatible with "Class4[int]"

conformance/results/pyright/dataclasses_usage.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ dataclasses_usage.py:61:5 - error: Fields without default values cannot appear a
88
dataclasses_usage.py:67:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues)
99
dataclasses_usage.py:73:5 - error: Fields without default values cannot appear after fields with default values (reportGeneralTypeIssues)
1010
dataclasses_usage.py:83:13 - error: Expected 1 positional argument (reportCallIssue)
11-
dataclasses_usage.py:88:36 - error: Argument of type "type[str]" cannot be assigned to parameter "default_factory" of type "() -> _T@field" in function "field"
12-
  No overloaded function matches type "() -> int" (reportArgumentType)
11+
dataclasses_usage.py:88:14 - error: Expression of type "str" is incompatible with declared type "int"
12+
  "str" is incompatible with "int" (reportAssignmentType)
1313
dataclasses_usage.py:127:8 - error: Expected 1 positional argument (reportCallIssue)
1414
dataclasses_usage.py:130:1 - error: Argument missing for parameter "y" (reportCallIssue)
1515
dataclasses_usage.py:179:6 - error: Expected 0 positional arguments (reportCallIssue)

conformance/results/pyright/directives_deprecated.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
conformant = "Partial"
2-
notes = """
3-
Does not report error for deprecated magic methods.
4-
"""
5-
conformance_automated = "Fail"
1+
conformant = "Pass"
2+
conformance_automated = "Pass"
63
errors_diff = """
7-
Line 41: Expected 1 errors
8-
Line 42: Expected 1 errors
9-
Line 48: Expected 1 errors
104
"""
115
output = """
126
directives_deprecated.py:18:44 - error: The class "Ham" is deprecated
@@ -19,10 +13,16 @@ directives_deprecated.py:30:9 - error: The function "foo" is deprecated
1913
  Only str will be allowed (reportDeprecated)
2014
directives_deprecated.py:34:7 - error: The class "Ham" is deprecated
2115
  Use Spam instead (reportDeprecated)
16+
directives_deprecated.py:41:5 - error: The method "__add__" in class "Spam" is deprecated
17+
  There is enough spam in the world (reportDeprecated)
18+
directives_deprecated.py:42:1 - error: The method "__add__" in class "Spam" is deprecated
19+
  There is enough spam in the world (reportDeprecated)
2220
directives_deprecated.py:44:6 - error: The getter for property "greasy" is deprecated
2321
  All spam will be equally greasy (reportDeprecated)
2422
directives_deprecated.py:47:6 - error: The setter for property "shape" is deprecated
2523
  Shapes are becoming immutable (reportDeprecated)
24+
directives_deprecated.py:48:6 - error: The setter for property "shape" is deprecated
25+
  Shapes are becoming immutable (reportDeprecated)
2626
directives_deprecated.py:58:1 - error: The function "invocable" is deprecated
2727
  Deprecated (reportDeprecated)
2828
directives_deprecated.py:69:1 - error: The function "lorem" is deprecated

conformance/results/pyright/generics_paramspec_components.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ generics_paramspec_components.py:36:20 - error: "kwargs" attribute of ParamSpec
1212
generics_paramspec_components.py:38:26 - error: "args" and "kwargs" attributes of ParamSpec must both appear within a function signature (reportGeneralTypeIssues)
1313
generics_paramspec_components.py:41:31 - error: "args" and "kwargs" attributes of ParamSpec must both appear within a function signature (reportGeneralTypeIssues)
1414
generics_paramspec_components.py:49:9 - error: Arguments for ParamSpec "P@decorator" are missing (reportCallIssue)
15-
generics_paramspec_components.py:51:11 - error: Arguments for ParamSpec "P@decorator" are missing (reportCallIssue)
15+
generics_paramspec_components.py:51:11 - error: Expected 0 positional arguments (reportCallIssue)
1616
generics_paramspec_components.py:60:28 - error: Keyword parameter "s" cannot appear in signature after ParamSpec args parameter (reportGeneralTypeIssues)
17-
generics_paramspec_components.py:70:12 - error: Expected 2 positional arguments (reportCallIssue)
18-
generics_paramspec_components.py:72:12 - error: Expected 2 positional arguments (reportCallIssue)
17+
generics_paramspec_components.py:70:12 - error: Expected 1 positional argument (reportCallIssue)
18+
generics_paramspec_components.py:72:12 - error: Expected 1 positional argument (reportCallIssue)
1919
generics_paramspec_components.py:83:19 - error: Expected 1 positional argument (reportCallIssue)
2020
generics_paramspec_components.py:98:20 - error: Argument of type "Literal['A']" cannot be assigned to parameter "a" of type "int"
2121
  "Literal['A']" is incompatible with "int" (reportArgumentType)

conformance/results/pyright/generics_syntax_declarations.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ generics_syntax_declarations.py:27:20 - error: Type arguments are not allowed wi
55
generics_syntax_declarations.py:34:11 - error: Cannot access attribute "is_integer" for class "str*"
66
  Attribute "is_integer" is unknown (reportAttributeAccessIssue)
77
generics_syntax_declarations.py:46:21 - error: TypeVar constraint type cannot be generic (reportGeneralTypeIssues)
8+
generics_syntax_declarations.py:50:17 - error: List expression not allowed in type annotation
9+
  Use List[T] to indicate a list type or Union[T1, T2] to indicate a union type (reportInvalidTypeForm)
810
generics_syntax_declarations.py:50:17 - error: Expected class but received "list[Unknown]" (reportGeneralTypeIssues)
911
generics_syntax_declarations.py:62:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues)
1012
generics_syntax_declarations.py:66:17 - error: TypeVar must have at least two constrained types (reportGeneralTypeIssues)
11-
generics_syntax_declarations.py:73:17 - error: Expected class but received "tuple[type[bytes], type[str]]" (reportGeneralTypeIssues)
13+
generics_syntax_declarations.py:73:17 - error: Variable not allowed in type expression (reportInvalidTypeForm)
1214
generics_syntax_declarations.py:77:18 - error: Expected class but received "Literal[3]" (reportGeneralTypeIssues)
1315
generics_syntax_declarations.py:81:23 - error: "S" is not defined (reportUndefinedVariable)
1416
"""

conformance/results/pyright/generics_typevartuple_basic.toml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
conformant = "Pass"
22
output = """
33
generics_typevartuple_basic.py:42:34 - error: Argument of type "Height" cannot be assigned to parameter "shape" of type "tuple[*Shape@Array]" in function "__init__"
4-
  "Height" is incompatible with "tuple[Height, Width]" (reportArgumentType)
5-
generics_typevartuple_basic.py:43:52 - error: Argument of type "tuple[Batch, Width]" cannot be assigned to parameter "shape" of type "tuple[*Shape@Array]" in function "__init__"
6-
  "Width" is incompatible with "Height" (reportArgumentType)
7-
generics_typevartuple_basic.py:45:5 - error: Argument of type "tuple[Time, Batch, Width, Height]" cannot be assigned to parameter "shape" of type "tuple[*Shape@Array]" in function "__init__"
8-
  "Width" is incompatible with "Height"
9-
  "Height" is incompatible with "Width" (reportArgumentType)
4+
  "Height" is incompatible with "tuple[*Shape@Array]" (reportArgumentType)
5+
generics_typevartuple_basic.py:43:35 - error: Expression of type "Array[Batch, Width]" is incompatible with declared type "Array[Batch, Height, Width]"
6+
  "Array[Batch, Width]" is incompatible with "Array[Batch, Height, Width]"
7+
    Type parameter "Shape@Array" is invariant, but "*tuple[Batch, Width]" is not the same as "*tuple[Batch, Height, Width]" (reportAssignmentType)
8+
generics_typevartuple_basic.py:44:41 - error: Expression of type "Array[Time, Batch, Width, Height]" is incompatible with declared type "Array[Time, Batch, Height, Width]"
9+
  "Array[Time, Batch, Width, Height]" is incompatible with "Array[Time, Batch, Height, Width]"
10+
    Type parameter "Shape@Array" is invariant, but "*tuple[Time, Batch, Width, Height]" is not the same as "*tuple[Time, Batch, Height, Width]" (reportAssignmentType)
1011
generics_typevartuple_basic.py:52:22 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape (reportInvalidTypeForm)
1112
generics_typevartuple_basic.py:53:37 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape (reportInvalidTypeForm)
1213
generics_typevartuple_basic.py:56:34 - error: Expected unpacked TypeVarTuple; use Unpack[Shape] or *Shape (reportInvalidTypeForm)

conformance/results/pyright/literals_literalstring.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ literals_literalstring.py:120:22 - error: Argument of type "str" cannot be assig
1414
  Type "str" is incompatible with type "LiteralString"
1515
    "str" is incompatible with "LiteralString" (reportArgumentType)
1616
literals_literalstring.py:134:51 - error: Argument of type "str" cannot be assigned to parameter "value" of type "T@Container" in function "__init__"
17-
  "str" is incompatible with "LiteralString" (reportArgumentType)
17+
  Type "str" is incompatible with type "LiteralString"
18+
    "str" is incompatible with "LiteralString" (reportArgumentType)
1819
literals_literalstring.py:171:21 - error: Expression of type "list[LiteralString]" is incompatible with declared type "list[str]"
1920
  "list[LiteralString]" is incompatible with "list[str]"
2021
    Type parameter "_T@list" is invariant, but "LiteralString" is not the same as "str"

conformance/results/pyright/protocols_generic.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protocols_generic.py:147:25 - error: Expression of type "ConcreteHasProperty4" i
3636
    "m" is an incompatible type
3737
      Type "(item: str, callback: (int) -> str) -> str" is incompatible with type "(item: T@m, callback: (T@m) -> str) -> str"
3838
        Parameter 2: type "(T@m) -> str" is incompatible with type "(int) -> str"
39-
          Type "(T@m) -> str" is incompatible with type "(int) -> str" (reportAssignmentType)
39+
          Type "(str) -> str" is incompatible with type "(int) -> str" (reportAssignmentType)
4040
"""
4141
conformance_automated = "Pass"
4242
errors_diff = """

0 commit comments

Comments
 (0)