Skip to content

Commit 36a2158

Browse files
committed
add
1 parent 84d6fd8 commit 36a2158

7 files changed

Lines changed: 90 additions & 81 deletions

File tree

‎conformance/results/mypy/specialtypes_sentinels.toml‎

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,25 @@ conformance_automated = "Fail"
33
errors_diff = """
44
Line 36: Expected 1 errors
55
Line 39: Expected 1 errors
6-
Line 21: Unexpected errors ['specialtypes_sentinels.py:21: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]']
7-
Line 23: Unexpected errors ['specialtypes_sentinels.py:23: error: Expression is of type "Any", not MISSING? [assert-type]', 'specialtypes_sentinels.py:23: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]']
8-
Line 27: Unexpected errors ['specialtypes_sentinels.py:27: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]']
9-
Line 29: Unexpected errors ['specialtypes_sentinels.py:29: error: Expression is of type "Any", not Cls.IN_CLASS? [assert-type]', 'specialtypes_sentinels.py:29: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]']
6+
Line 20: Unexpected errors ['specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]', 'specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]']
7+
Line 22: Unexpected errors ['specialtypes_sentinels.py:22: error: Expression is of type "Any", not MISSING? [assert-type]', 'specialtypes_sentinels.py:22: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]']
8+
Line 24: Unexpected errors ['specialtypes_sentinels.py:24: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]']
9+
Line 26: Unexpected errors ['specialtypes_sentinels.py:26: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]']
10+
Line 28: Unexpected errors ['specialtypes_sentinels.py:28: error: Expression is of type "Any", not Cls.IN_CLASS? [assert-type]', 'specialtypes_sentinels.py:28: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]']
1011
"""
1112
output = """
12-
specialtypes_sentinels.py:15: error: Incompatible default for parameter "x" (default has type "Sentinel", parameter has type "int") [assignment]
13-
specialtypes_sentinels.py:21: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]
14-
specialtypes_sentinels.py:21: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
15-
specialtypes_sentinels.py:23: error: Expression is of type "Any", not MISSING? [assert-type]
16-
specialtypes_sentinels.py:23: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]
17-
specialtypes_sentinels.py:23: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
18-
specialtypes_sentinels.py:27: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]
19-
specialtypes_sentinels.py:27: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
20-
specialtypes_sentinels.py:29: error: Expression is of type "Any", not Cls.IN_CLASS? [assert-type]
21-
specialtypes_sentinels.py:29: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]
22-
specialtypes_sentinels.py:29: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
13+
specialtypes_sentinels.py:14: error: Incompatible default for parameter "x" (default has type "Sentinel", parameter has type "int") [assignment]
14+
specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]
15+
specialtypes_sentinels.py:20: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
16+
specialtypes_sentinels.py:20: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]
17+
specialtypes_sentinels.py:22: error: Expression is of type "Any", not MISSING? [assert-type]
18+
specialtypes_sentinels.py:22: error: Variable "specialtypes_sentinels.MISSING" is not valid as a type [valid-type]
19+
specialtypes_sentinels.py:22: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
20+
specialtypes_sentinels.py:24: error: Variable "specialtypes_sentinels.SPECIAL" is not valid as a type [valid-type]
21+
specialtypes_sentinels.py:24: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
22+
specialtypes_sentinels.py:26: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]
23+
specialtypes_sentinels.py:26: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
24+
specialtypes_sentinels.py:28: error: Expression is of type "Any", not Cls.IN_CLASS? [assert-type]
25+
specialtypes_sentinels.py:28: error: Variable "specialtypes_sentinels.Cls.IN_CLASS" is not valid as a type [valid-type]
26+
specialtypes_sentinels.py:28: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
2327
"""

‎conformance/results/pycroscope/specialtypes_sentinels.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ conformance_automated = "Pass"
22
errors_diff = """
33
"""
44
output = """
5-
./specialtypes_sentinels.py:15:10: Default value for argument x incompatible with declared type int [incompatible_default]
6-
./specialtypes_sentinels.py:36:6: Incompatible argument type for x: expected int | Literal[<<MISSING>>] but got <Cls.IN_CLASS> [incompatible_argument]
5+
./specialtypes_sentinels.py:14:10: Default value for argument x incompatible with declared type int [incompatible_default]
6+
./specialtypes_sentinels.py:36:6: Incompatible argument type for x: expected int | Literal[<<MISSING>>, <SPECIAL>] but got <Cls.IN_CLASS> [incompatible_argument]
77
./specialtypes_sentinels.py:39:6: Incompatible argument type for x: expected int | Literal[<Cls.IN_CLASS>] but got <<MISSING>> [incompatible_argument]
88
"""

‎conformance/results/pyrefly/specialtypes_sentinels.toml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ conformance_automated = "Fail"
33
errors_diff = """
44
Line 36: Expected 1 errors
55
Line 39: Expected 1 errors
6-
Line 21: Unexpected errors ['Expected a type form, got instance of `type[int] | UnionType` [not-a-type]']
7-
Line 23: Unexpected errors ['assert_type(Sentinel, Unknown) failed [assert-type]', 'Expected a type form, got instance of `Sentinel` [not-a-type]']
8-
Line 25: Unexpected errors ['assert_type(Unknown, int) failed [assert-type]']
9-
Line 27: Unexpected errors ['Expected a type form, got instance of `type[int] | UnionType` [not-a-type]']
10-
Line 29: Unexpected errors ['assert_type(Sentinel, Unknown) failed [assert-type]', 'Expected a type form, got instance of `Sentinel` [not-a-type]']
11-
Line 31: Unexpected errors ['assert_type(Unknown, int) failed [assert-type]']
6+
Line 20: Unexpected errors ['Expected a type form, got instance of `type[int] | UnionType | Any` [not-a-type]']
7+
Line 22: Unexpected errors ['assert_type(Sentinel, Unknown) failed [assert-type]', 'Expected a type form, got instance of `Sentinel` [not-a-type]']
8+
Line 24: Unexpected errors ['Expected a type form, got instance of `type[int] | UnionType` [not-a-type]']
9+
Line 26: Unexpected errors ['Expected a type form, got instance of `type[int] | UnionType` [not-a-type]']
10+
Line 28: Unexpected errors ['assert_type(Sentinel, Unknown) failed [assert-type]', 'Expected a type form, got instance of `Sentinel` [not-a-type]']
11+
Line 30: Unexpected errors ['assert_type(Unknown, int) failed [assert-type]']
1212
"""
1313
output = """
14-
ERROR specialtypes_sentinels.py:15:20-27: Default `Sentinel` is not assignable to parameter `x` with type `int` [bad-function-definition]
15-
ERROR specialtypes_sentinels.py:21:14-27: Expected a type form, got instance of `type[int] | UnionType` [not-a-type]
16-
ERROR specialtypes_sentinels.py:23:20-32: assert_type(Sentinel, Unknown) failed [assert-type]
17-
ERROR specialtypes_sentinels.py:23:24-31: Expected a type form, got instance of `Sentinel` [not-a-type]
18-
ERROR specialtypes_sentinels.py:25:20-28: assert_type(Unknown, int) failed [assert-type]
19-
ERROR specialtypes_sentinels.py:27:14-32: Expected a type form, got instance of `type[int] | UnionType` [not-a-type]
20-
ERROR specialtypes_sentinels.py:29:20-37: assert_type(Sentinel, Unknown) failed [assert-type]
21-
ERROR specialtypes_sentinels.py:29:24-36: Expected a type form, got instance of `Sentinel` [not-a-type]
22-
ERROR specialtypes_sentinels.py:31:20-28: assert_type(Unknown, int) failed [assert-type]
14+
ERROR specialtypes_sentinels.py:14:20-27: Default `Sentinel` is not assignable to parameter `x` with type `int` [bad-function-definition]
15+
ERROR specialtypes_sentinels.py:20:14-37: Expected a type form, got instance of `type[int] | UnionType | Any` [not-a-type]
16+
ERROR specialtypes_sentinels.py:22:20-32: assert_type(Sentinel, Unknown) failed [assert-type]
17+
ERROR specialtypes_sentinels.py:22:24-31: Expected a type form, got instance of `Sentinel` [not-a-type]
18+
ERROR specialtypes_sentinels.py:24:24-37: Expected a type form, got instance of `type[int] | UnionType` [not-a-type]
19+
ERROR specialtypes_sentinels.py:26:14-32: Expected a type form, got instance of `type[int] | UnionType` [not-a-type]
20+
ERROR specialtypes_sentinels.py:28:20-37: assert_type(Sentinel, Unknown) failed [assert-type]
21+
ERROR specialtypes_sentinels.py:28:24-36: Expected a type form, got instance of `Sentinel` [not-a-type]
22+
ERROR specialtypes_sentinels.py:30:20-28: assert_type(Unknown, int) failed [assert-type]
2323
"""

‎conformance/results/pyright/specialtypes_sentinels.toml‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@ conformance_automated = "Fail"
33
errors_diff = """
44
Line 36: Expected 1 errors
55
Line 39: Expected 1 errors
6-
Line 21: Unexpected errors ['specialtypes_sentinels.py:21:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
7-
Line 23: Unexpected errors ['specialtypes_sentinels.py:23:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)', 'specialtypes_sentinels.py:23:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
8-
Line 25: Unexpected errors ['specialtypes_sentinels.py:25:21 - error: "assert_type" mismatch: expected "int" but received "int | Unknown" (reportAssertTypeFailure)']
9-
Line 27: Unexpected errors ['specialtypes_sentinels.py:27:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
10-
Line 29: Unexpected errors ['specialtypes_sentinels.py:29:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)', 'specialtypes_sentinels.py:29:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
11-
Line 31: Unexpected errors ['specialtypes_sentinels.py:31:21 - error: "assert_type" mismatch: expected "int" but received "int | Unknown" (reportAssertTypeFailure)']
6+
Line 20: Unexpected errors ['specialtypes_sentinels.py:20:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)', 'specialtypes_sentinels.py:20:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
7+
Line 22: Unexpected errors ['specialtypes_sentinels.py:22:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)', 'specialtypes_sentinels.py:22:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
8+
Line 24: Unexpected errors ['specialtypes_sentinels.py:24:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
9+
Line 26: Unexpected errors ['specialtypes_sentinels.py:26:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
10+
Line 28: Unexpected errors ['specialtypes_sentinels.py:28:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)', 'specialtypes_sentinels.py:28:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)']
11+
Line 30: Unexpected errors ['specialtypes_sentinels.py:30:21 - error: "assert_type" mismatch: expected "int" but received "int | Unknown" (reportAssertTypeFailure)']
1212
"""
1313
output = """
14-
specialtypes_sentinels.py:15:20 - error: Expression of type "Sentinel" cannot be assigned to parameter of type "int"
14+
specialtypes_sentinels.py:14:20 - error: Expression of type "Sentinel" cannot be assigned to parameter of type "int"
1515
  "Sentinel" is not assignable to "int" (reportArgumentType)
16-
specialtypes_sentinels.py:21:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
17-
specialtypes_sentinels.py:23:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)
18-
specialtypes_sentinels.py:23:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)
19-
specialtypes_sentinels.py:25:21 - error: "assert_type" mismatch: expected "int" but received "int | Unknown" (reportAssertTypeFailure)
20-
specialtypes_sentinels.py:27:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)
21-
specialtypes_sentinels.py:29:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)
22-
specialtypes_sentinels.py:29:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
23-
specialtypes_sentinels.py:31:21 - error: "assert_type" mismatch: expected "int" but received "int | Unknown" (reportAssertTypeFailure)
16+
specialtypes_sentinels.py:20:20 - error: Variable not allowed in type expression (reportInvalidTypeForm)
17+
specialtypes_sentinels.py:20:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)
18+
specialtypes_sentinels.py:22:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)
19+
specialtypes_sentinels.py:22:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)
20+
specialtypes_sentinels.py:24:30 - error: Variable not allowed in type expression (reportInvalidTypeForm)
21+
specialtypes_sentinels.py:26:24 - error: Variable not allowed in type expression (reportInvalidTypeForm)
22+
specialtypes_sentinels.py:28:21 - error: "assert_type" mismatch: expected "Unknown" but received "int | Unknown" (reportAssertTypeFailure)
23+
specialtypes_sentinels.py:28:28 - error: Variable not allowed in type expression (reportInvalidTypeForm)
24+
specialtypes_sentinels.py:30:21 - error: "assert_type" mismatch: expected "int" but received "int | Unknown" (reportAssertTypeFailure)
2425
"""

‎conformance/results/ty/specialtypes_sentinels.toml‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@ conformance_automated = "Fail"
33
errors_diff = """
44
Line 36: Expected 1 errors
55
Line 39: Expected 1 errors
6-
Line 21: Unexpected errors ['specialtypes_sentinels.py:21:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation']
7-
Line 23: Unexpected errors ['specialtypes_sentinels.py:23:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`']
8-
Line 25: Unexpected errors ['specialtypes_sentinels.py:25:9: error[type-assertion-failure] Type `int | Unknown` does not match asserted type `int`']
9-
Line 27: Unexpected errors ['specialtypes_sentinels.py:27:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation']
10-
Line 29: Unexpected errors ['specialtypes_sentinels.py:29:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`']
11-
Line 31: Unexpected errors ['specialtypes_sentinels.py:31:9: error[type-assertion-failure] Type `int | Unknown` does not match asserted type `int`']
6+
Line 20: Unexpected errors ['specialtypes_sentinels.py:20:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation', 'specialtypes_sentinels.py:20:30: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation']
7+
Line 22: Unexpected errors ['specialtypes_sentinels.py:22:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`']
8+
Line 24: Unexpected errors ['specialtypes_sentinels.py:24:30: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a type expression']
9+
Line 26: Unexpected errors ['specialtypes_sentinels.py:26:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation']
10+
Line 28: Unexpected errors ['specialtypes_sentinels.py:28:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`']
11+
Line 30: Unexpected errors ['specialtypes_sentinels.py:30:9: error[type-assertion-failure] Type `int | Unknown` does not match asserted type `int`']
1212
"""
1313
output = """
14-
specialtypes_sentinels.py:15:11: error[invalid-parameter-default] Default value of type `Sentinel` is not assignable to annotated parameter type `int`
15-
specialtypes_sentinels.py:21:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation
16-
specialtypes_sentinels.py:23:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`
17-
specialtypes_sentinels.py:25:9: error[type-assertion-failure] Type `int | Unknown` does not match asserted type `int`
18-
specialtypes_sentinels.py:27:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation
19-
specialtypes_sentinels.py:29:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`
20-
specialtypes_sentinels.py:31:9: error[type-assertion-failure] Type `int | Unknown` does not match asserted type `int`
14+
specialtypes_sentinels.py:14:11: error[invalid-parameter-default] Default value of type `Sentinel` is not assignable to annotated parameter type `int`
15+
specialtypes_sentinels.py:20:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation
16+
specialtypes_sentinels.py:20:30: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation
17+
specialtypes_sentinels.py:22:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`
18+
specialtypes_sentinels.py:24:30: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a type expression
19+
specialtypes_sentinels.py:26:20: error[invalid-type-form] Variable of type `Sentinel` is not allowed in a parameter annotation
20+
specialtypes_sentinels.py:28:9: error[type-assertion-failure] Type `(int & Sentinel) | (Unknown & Sentinel)` does not match asserted type `@Todo`
21+
specialtypes_sentinels.py:30:9: error[type-assertion-failure] Type `int | Unknown` does not match asserted type `int`
2122
"""

0 commit comments

Comments
 (0)