From dea66f2818f583b41eab38a169ae485323b7fd1b Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Wed, 5 Jun 2024 14:26:05 -0700 Subject: [PATCH] Updated conformance test results for pyright 1.1.366. This version fixes several conformance issues related to the recently added Enumerations chapter. --- conformance/results/mypy/version.toml | 2 +- conformance/results/pyre/version.toml | 2 +- conformance/results/pyright/enums_expansion.toml | 13 ++----------- conformance/results/pyright/enums_members.toml | 12 +++--------- conformance/results/pyright/version.toml | 2 +- conformance/results/pytype/version.toml | 2 +- conformance/results/results.html | 12 ++++++------ 7 files changed, 15 insertions(+), 30 deletions(-) diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index 2d942f878..dc9b55ed5 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.10.0" -test_duration = 0.9 +test_duration = 1.5 diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index 47c7ebccd..4687d8542 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.21" -test_duration = 2.6 +test_duration = 3.6 diff --git a/conformance/results/pyright/enums_expansion.toml b/conformance/results/pyright/enums_expansion.toml index c0150f0cc..2a48dea06 100644 --- a/conformance/results/pyright/enums_expansion.toml +++ b/conformance/results/pyright/enums_expansion.toml @@ -1,16 +1,7 @@ -conformant = "Partial" -notes = """ -Applies type narrowing incorrectly for `a is E` pattern where `E` is an enum member. - -""" -conformance_automated = "Fail" +conformant = "Pass" +conformance_automated = "Pass" errors_diff = """ -Line 78: Unexpected errors ['enums_expansion.py:78:12 - error: Expression of type "list[Never]" is incompatible with return type "list[Answer]"'] """ output = """ enums_expansion.py:53:21 - error: "assert_type" mismatch: expected "Literal[CustomFlags.FLAG3]" but received "CustomFlags" (reportAssertTypeFailure) -enums_expansion.py:78:12 - error: Expression of type "list[Never]" is incompatible with return type "list[Answer]" -  "list[Never]" is incompatible with "list[Answer]" -    Type parameter "_T@list" is invariant, but "Never" is not the same as "Answer" -    Consider switching from "list" to "Sequence" which is covariant (reportReturnType) """ diff --git a/conformance/results/pyright/enums_members.toml b/conformance/results/pyright/enums_members.toml index ed18e64b3..00145a6d4 100644 --- a/conformance/results/pyright/enums_members.toml +++ b/conformance/results/pyright/enums_members.toml @@ -1,18 +1,12 @@ -conformant = "Partial" +conformant = "Pass" notes = """ -Does not reject use of annotation with enum member. -Does not treat annotated attributes as non-members in stub. Does not support `_ignore_` mechanism (optional). """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 46: Expected 1 errors -Line 31: Unexpected errors ['enums_members.py:31:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.genus]" (reportAssertTypeFailure)'] -Line 32: Unexpected errors ['enums_members.py:32:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.species]" (reportAssertTypeFailure)'] """ output = """ -enums_members.py:31:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.genus]" (reportAssertTypeFailure) -enums_members.py:32:13 - error: "assert_type" mismatch: expected "str" but received "Literal[Pet2.species]" (reportAssertTypeFailure) +enums_members.py:46:5 - error: Type annotations are not allowed for enum members (reportGeneralTypeIssues) enums_members.py:78:13 - error: "assert_type" mismatch: expected "Unknown" but received "(x: Unknown) -> str" (reportAssertTypeFailure) enums_members.py:78:37 - error: Type arguments for "Literal" must be None, a literal value (int, bool, str, or bytes), or an enum value enums_members.py:79:13 - error: "assert_type" mismatch: expected "Unknown" but received "(x: int) -> int" (reportAssertTypeFailure) diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 99853f7f6..d79a176b0 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ -version = "pyright 1.1.365" +version = "pyright 1.1.366" test_duration = 1.4 diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index e1fc04b63..9c27bf79d 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2024.04.11" -test_duration = 29.9 +test_duration = 32.9 diff --git a/conformance/results/results.html b/conformance/results/results.html index 7f2380997..56739d7a9 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -159,16 +159,16 @@

Python Type System Conformance Test Results

- - + @@ -932,7 +932,7 @@

Python Type System Conformance Test Results

- +
 
mypy 1.10.0
-
0.9sec
+
1.5sec
pyright 1.1.365
+
pyright 1.1.366
1.4sec
pyre 0.9.21
-
2.6sec
+
3.6sec
pytype 2024.04.11
-
29.9sec
+
32.9sec
@@ -914,7 +914,7 @@

Python Type System Conformance Test Results

     enums_expansion
Partial

Improperly applies narrowing to Flag subclass.

Partial

Applies type narrowing incorrectly for `a is E` pattern where `E` is an enum member.

Pass
Pass*

Does not perform type narrowing based on enum literal expansion (optional).

Partial

Improperly applies narrowing to Flag subclass.

     enums_members
Partial

Does not treat attribute with annotation and no assignment as non-member.

Does not reject use of annotation with enum member.

Does not treat callables as non-members.

Does not honor `enum.nonmember` to define non-member attribute.

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Does not support `_ignore_` mechanism (optional).

Partial

Does not reject use of annotation with enum member.

Does not treat annotated attributes as non-members in stub.

Does not support `_ignore_` mechanism (optional).

Pass*

Does not support `_ignore_` mechanism (optional).

Partial

Does not reject use of annotation with enum member.

Does not treat callables as non-members.

Does not treat annotated attributes as non-members.

Does not honor `enum.nonmember` to define non-member attribute.

Does not honor `enum.member` as method decorator.

Does not properly handle aliased enum members.

Rejects use of `_ignore_`.

Does not support `_ignore_` mechanism (optional).

Partial

Does not reject use of annotation with enum member.

Does not support `enum.member` and `enum.nonmember`.

Does not support `_ignore_` mechanism (optional).