diff --git a/conformance/results/basilisk/enums_expansion.toml b/conformance/results/basilisk/enums_expansion.toml index 8895a74ec..e4a77e027 100644 --- a/conformance/results/basilisk/enums_expansion.toml +++ b/conformance/results/basilisk/enums_expansion.toml @@ -1,8 +1,13 @@ -conformant = "Pass" -conformance_automated = "Pass" +conformant = "Partial" +notes = """ +Does not accept an enum-typed value where a complete union of all literal members is declared, although it treats the two as equivalent for `assert_type`. +""" +conformance_automated = "Fail" errors_diff = """ +Line 85: Unexpected errors ['enums_expansion.py:85:5: error: Type mismatch: `x` is annotated `Literal[Answer.Yes, Answer.No]` (answer.yes | answer.no) but assigned answer [assignment_compatibility]'] """ output = """ -enums_expansion.py:25:9: error: Redundant `assert_type` with `Literal[Color.GREEN]` on enum-typed parameter [enums_expansion] -enums_expansion.py:53:9: error: Redundant `assert_type` with `Literal[CustomFlags.FLAG3]` on enum-typed parameter [enums_expansion] +enums_expansion.py:28:9: error: Redundant `assert_type` with `Literal[Color.GREEN]` on enum-typed parameter [enums_expansion] +enums_expansion.py:56:9: error: Redundant `assert_type` with `Literal[CustomFlags.FLAG3]` on enum-typed parameter [enums_expansion] +enums_expansion.py:85:5: error: Type mismatch: `x` is annotated `Literal[Answer.Yes, Answer.No]` (answer.yes | answer.no) but assigned answer [assignment_compatibility] """ diff --git a/conformance/results/mypy/enums_expansion.toml b/conformance/results/mypy/enums_expansion.toml index 8b6a14aa0..b14b1afd2 100644 --- a/conformance/results/mypy/enums_expansion.toml +++ b/conformance/results/mypy/enums_expansion.toml @@ -4,9 +4,9 @@ Improperly applies narrowing to `Flag` subclass. """ conformance_automated = "Fail" errors_diff = """ -Line 53: Expected 1 errors -Line 52: Unexpected errors ['enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [assert-type]'] +Line 56: Expected 1 errors +Line 55: Unexpected errors ['enums_expansion.py:55: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [assert-type]'] """ output = """ -enums_expansion.py:52: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [assert-type] +enums_expansion.py:55: error: Expression is of type "Literal[CustomFlags.FLAG3]", not "CustomFlags" [assert-type] """ diff --git a/conformance/results/pycroscope/enums_expansion.toml b/conformance/results/pycroscope/enums_expansion.toml index e12a9c12f..529ddb5b1 100644 --- a/conformance/results/pycroscope/enums_expansion.toml +++ b/conformance/results/pycroscope/enums_expansion.toml @@ -2,5 +2,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -./enums_expansion.py:53:20: enums_expansion.CustomFlags is not equivalent to Literal[] +./enums_expansion.py:56:20: enums_expansion.CustomFlags is not equivalent to Literal[] """ diff --git a/conformance/results/pyrefly/enums_expansion.toml b/conformance/results/pyrefly/enums_expansion.toml index bbf9ce7ce..7c27606f9 100644 --- a/conformance/results/pyrefly/enums_expansion.toml +++ b/conformance/results/pyrefly/enums_expansion.toml @@ -3,5 +3,5 @@ conformance_automated = "Pass" errors_diff = """ """ output = """ -ERROR enums_expansion.py:53:20-51: assert_type(CustomFlags, Literal[CustomFlags.FLAG3]) failed [assert-type] +ERROR enums_expansion.py:56:20-51: assert_type(CustomFlags, Literal[CustomFlags.FLAG3]) failed [assert-type] """ diff --git a/conformance/results/pyright/enums_expansion.toml b/conformance/results/pyright/enums_expansion.toml index 2a48dea06..ad3e5573a 100644 --- a/conformance/results/pyright/enums_expansion.toml +++ b/conformance/results/pyright/enums_expansion.toml @@ -1,7 +1,17 @@ -conformant = "Pass" -conformance_automated = "Pass" +conformant = "Partial" +notes = """ +Does not treat a complete union of all literal members as equivalent to the enum type. +""" +conformance_automated = "Fail" errors_diff = """ +Line 85: Unexpected errors ['enums_expansion.py:85:41 - error: Type "Answer" is not assignable to declared type "Literal[Answer.Yes, Answer.No]"'] +Line 86: Unexpected errors ['enums_expansion.py:86:17 - error: "assert_type" mismatch: expected "Literal[Answer.Yes, Answer.No]" but received "Answer" (reportAssertTypeFailure)'] """ output = """ -enums_expansion.py:53:21 - error: "assert_type" mismatch: expected "Literal[CustomFlags.FLAG3]" but received "CustomFlags" (reportAssertTypeFailure) +enums_expansion.py:56:21 - error: "assert_type" mismatch: expected "Literal[CustomFlags.FLAG3]" but received "CustomFlags" (reportAssertTypeFailure) +enums_expansion.py:85:41 - error: Type "Answer" is not assignable to declared type "Literal[Answer.Yes, Answer.No]" +  Type "Answer" is not assignable to type "Literal[Answer.Yes, Answer.No]" +    "Answer" is not assignable to type "Literal[Answer.Yes]" +    "Answer" is not assignable to type "Literal[Answer.No]" (reportAssignmentType) +enums_expansion.py:86:17 - error: "assert_type" mismatch: expected "Literal[Answer.Yes, Answer.No]" but received "Answer" (reportAssertTypeFailure) """ diff --git a/conformance/results/results.html b/conformance/results/results.html index a236e7b95..23306cb7d 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -2477,7 +2477,12 @@

Python Type System Conformance Test Results

enums_expansion - Pass + + Partial + + Partial