Skip to content

Commit 4e54113

Browse files
committed
updates
1 parent eb31923 commit 4e54113

File tree

6 files changed

+21
-14
lines changed

6 files changed

+21
-14
lines changed

conformance/results/mypy/directives_assert_type.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
conformant = "Pass"
22
output = """
3-
directives_assert_type.py:28: error: Expression is of type "int | str", not "int" [assert-type]
3+
directives_assert_type.py:27: error: Expression is of type "int | str", not "int" [assert-type]
4+
directives_assert_type.py:28: error: Expression is of type "int | str", not "Any" [assert-type]
45
directives_assert_type.py:29: error: Expression is of type "Any", not "int" [assert-type]
56
directives_assert_type.py:30: error: Expression is of type "Literal[4]", not "int" [assert-type]
67
directives_assert_type.py:32: error: "assert_type" expects 2 arguments [misc]

conformance/results/pyre/directives_assert_type.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ conformant = "Pass"
22
notes = """
33
"""
44
output = """
5-
directives_assert_type.py:22:4 Assert type [70]: Expected `Union[bool, int, str]` but got `Union[int, str]`.
6-
directives_assert_type.py:28:4 Assert type [70]: Expected `int` but got `Union[int, str]`.
5+
directives_assert_type.py:27:4 Assert type [70]: Expected `int` but got `Union[int, str]`.
6+
directives_assert_type.py:28:4 Assert type [70]: Expected `typing.Any` but got `Union[int, str]`.
77
directives_assert_type.py:29:4 Assert type [70]: Expected `int` but got `typing.Any`.
88
directives_assert_type.py:30:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[4]`.
99
directives_assert_type.py:32:4 Missing argument [20]: Call `assert_type` expects argument in position 0.
1010
directives_assert_type.py:33:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal['']`.
1111
directives_assert_type.py:34:4 Too many arguments [19]: Call `assert_type` expects 2 positional arguments, 3 were provided.
12+
directives_assert_type.py:41:4 Assert type [70]: Expected `Union[typing_extensions.Literal['spam'], str]` but got `str`.
1213
"""
13-
conformance_automated = "Fail"
14+
conformance_automated = "Pass"
1415
errors_diff = """
15-
Line 22: Unexpected errors ['directives_assert_type.py:22:4 Assert type [70]: Expected `Union[bool, int, str]` but got `Union[int, str]`.']
1616
"""

conformance/results/pyright/aliases_newtype.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ aliases_newtype.py:11:8 - error: Argument of type "Literal['user']" cannot be as
77
  "Literal['user']" is not assignable to "int" (reportArgumentType)
88
aliases_newtype.py:12:14 - error: Type "Literal[42]" is not assignable to declared type "UserId"
99
  "Literal[42]" is not assignable to "UserId" (reportAssignmentType)
10+
aliases_newtype.py:18:11 - error: Type "type[UserId]" is not assignable to declared type "type"
11+
  "FunctionType" is not assignable to "type" (reportAssignmentType)
12+
aliases_newtype.py:23:16 - error: Argument of type "type[UserId]" cannot be assigned to parameter "class_or_tuple" of type "_ClassInfo" in function "isinstance"
13+
  Type "FunctionType" is not assignable to type "_ClassInfo"
14+
    "FunctionType" is not assignable to "type"
15+
    "FunctionType" is not assignable to "UnionType"
16+
    "FunctionType" is not assignable to "tuple[_ClassInfo, ...]" (reportArgumentType)
1017
aliases_newtype.py:23:16 - error: Second argument to "isinstance" must be a class or tuple of classes
1118
  Class created with NewType cannot be used with instance and class checks (reportArgumentType)
1219
aliases_newtype.py:26:21 - error: Base class "UserId" is marked final and cannot be subclassed (reportGeneralTypeIssues)
@@ -20,7 +27,6 @@ aliases_newtype.py:61:38 - error: NewType cannot be used with structural type (a
2027
aliases_newtype.py:63:15 - error: NewType requires two positional arguments (reportCallIssue)
2128
aliases_newtype.py:65:38 - error: The second argument to NewType must be a known class, not Any or Unknown (reportGeneralTypeIssues)
2229
"""
23-
conformance_automated = "Fail"
30+
conformance_automated = "Pass"
2431
errors_diff = """
25-
Line 18: Expected 1 errors
2632
"""

conformance/results/pyright/directives_assert_type.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ notes = """
33
Fails to treat equivalent unions as equivalent.
44
"""
55
output = """
6-
directives_assert_type.py:22:17 - error: "assert_type" mismatch: expected "int | bool | str" but received "int | str" (reportAssertTypeFailure)
7-
directives_assert_type.py:28:17 - error: "assert_type" mismatch: expected "int" but received "int | str" (reportAssertTypeFailure)
6+
directives_assert_type.py:27:17 - error: "assert_type" mismatch: expected "int" but received "int | str" (reportAssertTypeFailure)
7+
directives_assert_type.py:28:17 - error: "assert_type" mismatch: expected "Any" but received "int | str" (reportAssertTypeFailure)
88
directives_assert_type.py:29:17 - error: "assert_type" mismatch: expected "int" but received "Any" (reportAssertTypeFailure)
99
directives_assert_type.py:30:17 - error: "assert_type" mismatch: expected "int" but received "Literal[4]" (reportAssertTypeFailure)
1010
directives_assert_type.py:32:5 - error: "assert_type" expects two positional arguments (reportCallIssue)
1111
directives_assert_type.py:33:17 - error: "assert_type" mismatch: expected "int" but received "Literal['']" (reportAssertTypeFailure)
1212
directives_assert_type.py:34:5 - error: "assert_type" expects two positional arguments (reportCallIssue)
13+
directives_assert_type.py:41:17 - error: "assert_type" mismatch: expected "str | Literal['spam']" but received "str" (reportAssertTypeFailure)
1314
"""
14-
conformance_automated = "Fail"
15+
conformance_automated = "Pass"
1516
errors_diff = """
16-
Line 22: Unexpected errors ['directives_assert_type.py:22:17 - error: "assert_type" mismatch: expected "int | bool | str" but received "int | str" (reportAssertTypeFailure)']
1717
"""

conformance/results/pyright/generics_type_erasure.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ generics_type_erasure.py:42:11 - error: Access to generic instance variable thro
1515
generics_type_erasure.py:43:11 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
1616
generics_type_erasure.py:44:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
1717
generics_type_erasure.py:45:6 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
18+
generics_type_erasure.py:46:10 - error: Access to generic instance variable through class is ambiguous (reportGeneralTypeIssues)
1819
"""
19-
conformance_automated = "Fail"
20+
conformance_automated = "Pass"
2021
errors_diff = """
21-
Line 46: Expected 1 errors
2222
"""

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-
      "FunctionType" is not assignable to "Sequence[float]" (reportAssignmentType)
49+
      "MethodType" 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)

0 commit comments

Comments
 (0)