diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index 9e6527ca..1012f096 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.14.1" -test_duration = 1.8 +test_duration = 1.7 diff --git a/conformance/results/pyre/overloads_evaluation.toml b/conformance/results/pyre/overloads_evaluation.toml index 7b950d72..9a848686 100644 --- a/conformance/results/pyre/overloads_evaluation.toml +++ b/conformance/results/pyre/overloads_evaluation.toml @@ -19,7 +19,7 @@ Line 147: Unexpected errors ['overloads_evaluation.py:147:29 Incompatible parame Line 148: Unexpected errors ['overloads_evaluation.py:148:4 Assert type [70]: Expected `Union[int, str]` but got `int`.'] Line 169: Unexpected errors ['overloads_evaluation.py:169:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`.'] Line 170: Unexpected errors ['overloads_evaluation.py:170:4 Assert type [70]: Expected `Union[int, str]` but got `int`.'] -Line 196: Unexpected errors ['overloads_evaluation.py:196:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`.'] +Line 196: Unexpected errors ['overloads_evaluation.py:196:4 Assert type [70]: Expected `int` but got `str`.'] Line 224: Unexpected errors ['overloads_evaluation.py:224:4 Assert type [70]: Expected `typing.Any` but got `int`.'] """ output = """ @@ -38,6 +38,6 @@ overloads_evaluation.py:147:29 Incompatible parameter type [6]: In call `expand_ overloads_evaluation.py:148:4 Assert type [70]: Expected `Union[int, str]` but got `int`. overloads_evaluation.py:169:24 Incompatible parameter type [6]: In call `expand_tuple`, for 1st positional argument, expected `Tuple[int, int]` but got `Tuple[int, Union[int, str]]`. overloads_evaluation.py:170:4 Assert type [70]: Expected `Union[int, str]` but got `int`. -overloads_evaluation.py:196:4 Assert type [70]: Expected `int` but got `typing_extensions.Literal[0]`. +overloads_evaluation.py:196:4 Assert type [70]: Expected `int` but got `str`. overloads_evaluation.py:224:4 Assert type [70]: Expected `typing.Any` but got `int`. """ diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index cd4e9e46..2904f5c8 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.23" -test_duration = 6.7 +test_duration = 6.0 diff --git a/conformance/results/pyright/overloads_evaluation.toml b/conformance/results/pyright/overloads_evaluation.toml index 8684e650..15c1a772 100644 --- a/conformance/results/pyright/overloads_evaluation.toml +++ b/conformance/results/pyright/overloads_evaluation.toml @@ -3,6 +3,7 @@ notes = """ Does not expand boolean arguments to Literal[True] and Literal[False]. Does not expand enum arguments to literal variants. Does not expand tuple arguments to possible combinations. +Does not prefer variadic match to indeterminate-length unpacked argument. """ conformance_automated = "Fail" errors_diff = """ @@ -12,6 +13,7 @@ Line 129: Unexpected errors ['overloads_evaluation.py:129:12 - error: No overloa Line 130: Unexpected errors ['overloads_evaluation.py:130:17 - error: "assert_type" mismatch: expected "Literal[0, 1]" but received "Unknown" (reportAssertTypeFailure)'] Line 169: Unexpected errors ['overloads_evaluation.py:169:12 - error: No overloads for "expand_tuple" match the provided arguments (reportCallIssue)', 'overloads_evaluation.py:169:29 - error: Argument of type "tuple[Literal[1], int | str]" cannot be assigned to parameter "x" of type "tuple[int, str]" in function "expand_tuple"'] Line 170: Unexpected errors ['overloads_evaluation.py:170:17 - error: "assert_type" mismatch: expected "int | str" but received "Unknown" (reportAssertTypeFailure)'] +Line 196: Unexpected errors ['overloads_evaluation.py:196:17 - error: "assert_type" mismatch: expected "int" but received "str" (reportAssertTypeFailure)'] """ output = """ overloads_evaluation.py:32:1 - error: No overloads for "example1" match the provided arguments @@ -40,4 +42,5 @@ overloads_evaluation.py:169:29 - error: Argument of type "tuple[Literal[1], int   Type "int | str" is not assignable to type "str"     "int" is not assignable to "str" (reportArgumentType) overloads_evaluation.py:170:17 - error: "assert_type" mismatch: expected "int | str" but received "Unknown" (reportAssertTypeFailure) +overloads_evaluation.py:196:17 - error: "assert_type" mismatch: expected "int" but received "str" (reportAssertTypeFailure) """ diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 324d1870..1ae5a35b 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ version = "pyright 1.1.391" -test_duration = 1.7 +test_duration = 1.5 diff --git a/conformance/results/pytype/overloads_evaluation.toml b/conformance/results/pytype/overloads_evaluation.toml index c9df7902..004eea70 100644 --- a/conformance/results/pytype/overloads_evaluation.toml +++ b/conformance/results/pytype/overloads_evaluation.toml @@ -1,8 +1,8 @@ conformant = "Partial" notes = """ -Does not pick a winning overload based on arity, prior to considering argument types. Does not perform argument expansion (on any types) when matching overloads. Does not treat multiple matches due to gradual types as ambiguous. +Does not prefer variadic match to indeterminate-length unpacked argument. """ conformance_automated = "Fail" errors_diff = """ @@ -21,6 +21,7 @@ Line 148: Unexpected errors ['overloads_evaluation.py:148:5: \\x1b[1m\\x1b[31mer Line 166: Unexpected errors ['overloads_evaluation.py:166:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in expand_tuple: bad return type [bad-return-type]'] Line 170: Unexpected errors ['overloads_evaluation.py:170:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_expand_tuple: int [assert-type]'] Line 188: Unexpected errors ['overloads_evaluation.py:188:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in variadic: bad return type [bad-return-type]'] +Line 196: Unexpected errors ['overloads_evaluation.py:196:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_variadic: str [assert-type]'] Line 217: Unexpected errors ['overloads_evaluation.py:217:12: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in example4: bad return type [bad-return-type]'] Line 224: Unexpected errors ['overloads_evaluation.py:224:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in check_example4: int [assert-type]'] """ @@ -117,6 +118,11 @@ overloads_evaluation.py:188:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in return 1 \u001b[1m\u001b[31m~\u001b[39m\u001b[0m +overloads_evaluation.py:196:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in check_variadic: str [assert-type] + + assert_type(ret1, int) + \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m + overloads_evaluation.py:217:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in example4: bad return type [bad-return-type] return 1 diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index 1da94b08..ce6c9dce 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2024.10.11" -test_duration = 31.1 +test_duration = 30.8 diff --git a/conformance/results/results.html b/conformance/results/results.html index 9a6bc90e..c55cd345 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -159,16 +159,16 @@

Python Type System Conformance Test Results

- + - + diff --git a/conformance/tests/overloads_evaluation.py b/conformance/tests/overloads_evaluation.py index fc6ce698..1c14cbd2 100644 --- a/conformance/tests/overloads_evaluation.py +++ b/conformance/tests/overloads_evaluation.py @@ -177,11 +177,11 @@ def check_expand_tuple(v: int | str) -> None: # > If so, eliminate overloads that do not have a variadic parameter. @overload -def variadic(x: int, /) -> Literal[0]: +def variadic(x: int, /) -> str: ... @overload -def variadic(*args: int) -> int: +def variadic(x: int, y: int, /, *args: int) -> int: ... def variadic(*args: int) -> int | str:
 
mypy 1.14.1
-
1.8sec
+
1.7sec
pyright 1.1.391
-
1.7sec
+
1.5sec
pyre 0.9.23
-
6.7sec
+
6.0sec
pytype 2024.10.11
-
31.1sec
+
30.8sec
@@ -692,9 +692,9 @@

Python Type System Conformance Test Results

     overloads_evaluation
Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand tuple arguments to possible combinations.

Does not prefer variadic match to indeterminate-length unpacked argument.

Partial

Does not expand boolean arguments to Literal[True] and Literal[False].

Does not expand enum arguments to literal variants.

Does not expand type[A | B] to type[A] and type[B].

Does not expand tuple arguments to possible combinations.

Does not prefer variadic match to indeterminate-length unpacked argument.

Does not treat multiple matches due to gradual types as ambiguous.

Partial

Does not pick a winning overload based on arity, prior to considering argument types.

Does not perform argument expansion (on any types) when matching overloads.

Does not treat multiple matches due to gradual types as ambiguous.

Partial

Does not perform argument expansion (on any types) when matching overloads.

Does not treat multiple matches due to gradual types as ambiguous.

Does not prefer variadic match to indeterminate-length unpacked argument.

     overloads_overlap Pass