From bbe8508c006f4dc10ee680e74f769f24b6ab4b54 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 31 Dec 2023 00:10:01 -0700 Subject: [PATCH] Added tests for "Type checker directives" section of spec. --- .../results/mypy/directives_assert_type.toml | 10 ++++ conformance/results/mypy/directives_cast.toml | 16 +++++++ .../mypy/directives_no_type_check.toml | 3 ++ .../results/mypy/directives_reveal_type.toml | 11 +++++ .../mypy/directives_type_checking.toml | 3 ++ .../results/mypy/directives_type_ignore.toml | 10 ++++ .../mypy/directives_version_platform.toml | 11 +++++ conformance/results/mypy/version.toml | 2 +- .../results/pyre/directives_assert_type.toml | 8 ++++ conformance/results/pyre/directives_cast.toml | 6 +++ .../pyre/directives_no_type_check.toml | 8 ++++ .../results/pyre/directives_reveal_type.toml | 8 ++++ .../pyre/directives_type_checking.toml | 3 ++ .../results/pyre/directives_type_ignore.toml | 3 ++ .../pyre/directives_version_platform.toml | 11 +++++ conformance/results/pyre/version.toml | 2 +- .../pyright/directives_assert_type.toml | 8 ++++ .../results/pyright/directives_cast.toml | 8 ++++ .../pyright/directives_no_type_check.toml | 9 ++++ .../pyright/directives_reveal_type.toml | 9 ++++ .../pyright/directives_type_checking.toml | 3 ++ .../pyright/directives_type_ignore.toml | 3 ++ .../pyright/directives_version_platform.toml | 3 ++ conformance/results/pyright/version.toml | 2 +- .../pytype/directives_assert_type.toml | 18 +++++++ .../results/pytype/directives_cast.toml | 11 +++++ .../pytype/directives_no_type_check.toml | 11 +++++ .../pytype/directives_reveal_type.toml | 12 +++++ .../pytype/directives_type_checking.toml | 3 ++ .../pytype/directives_type_ignore.toml | 10 ++++ .../pytype/directives_version_platform.toml | 16 +++++++ .../pytype/qualifiers_final_decorator.toml | 4 +- conformance/results/pytype/version.toml | 2 +- conformance/results/results.html | 48 +++++++++++++++++-- conformance/tests/directives_assert_type.py | 36 ++++++++++++++ conformance/tests/directives_cast.py | 17 +++++++ conformance/tests/directives_no_type_check.py | 19 ++++++++ conformance/tests/directives_reveal_type.py | 24 ++++++++++ conformance/tests/directives_type_checking.py | 19 ++++++++ conformance/tests/directives_type_ignore.py | 14 ++++++ .../tests/directives_version_platform.py | 45 +++++++++++++++++ 41 files changed, 459 insertions(+), 10 deletions(-) create mode 100644 conformance/results/mypy/directives_assert_type.toml create mode 100644 conformance/results/mypy/directives_cast.toml create mode 100644 conformance/results/mypy/directives_no_type_check.toml create mode 100644 conformance/results/mypy/directives_reveal_type.toml create mode 100644 conformance/results/mypy/directives_type_checking.toml create mode 100644 conformance/results/mypy/directives_type_ignore.toml create mode 100644 conformance/results/mypy/directives_version_platform.toml create mode 100644 conformance/results/pyre/directives_assert_type.toml create mode 100644 conformance/results/pyre/directives_cast.toml create mode 100644 conformance/results/pyre/directives_no_type_check.toml create mode 100644 conformance/results/pyre/directives_reveal_type.toml create mode 100644 conformance/results/pyre/directives_type_checking.toml create mode 100644 conformance/results/pyre/directives_type_ignore.toml create mode 100644 conformance/results/pyre/directives_version_platform.toml create mode 100644 conformance/results/pyright/directives_assert_type.toml create mode 100644 conformance/results/pyright/directives_cast.toml create mode 100644 conformance/results/pyright/directives_no_type_check.toml create mode 100644 conformance/results/pyright/directives_reveal_type.toml create mode 100644 conformance/results/pyright/directives_type_checking.toml create mode 100644 conformance/results/pyright/directives_type_ignore.toml create mode 100644 conformance/results/pyright/directives_version_platform.toml create mode 100644 conformance/results/pytype/directives_assert_type.toml create mode 100644 conformance/results/pytype/directives_cast.toml create mode 100644 conformance/results/pytype/directives_no_type_check.toml create mode 100644 conformance/results/pytype/directives_reveal_type.toml create mode 100644 conformance/results/pytype/directives_type_checking.toml create mode 100644 conformance/results/pytype/directives_type_ignore.toml create mode 100644 conformance/results/pytype/directives_version_platform.toml create mode 100644 conformance/tests/directives_assert_type.py create mode 100644 conformance/tests/directives_cast.py create mode 100644 conformance/tests/directives_no_type_check.py create mode 100644 conformance/tests/directives_reveal_type.py create mode 100644 conformance/tests/directives_type_checking.py create mode 100644 conformance/tests/directives_type_ignore.py create mode 100644 conformance/tests/directives_version_platform.py diff --git a/conformance/results/mypy/directives_assert_type.toml b/conformance/results/mypy/directives_assert_type.toml new file mode 100644 index 000000000..73330752d --- /dev/null +++ b/conformance/results/mypy/directives_assert_type.toml @@ -0,0 +1,10 @@ +conformant = "Pass" +output = """ +directives_assert_type.py:27: error: Expression is of type "int | str", not "int" [assert-type] +directives_assert_type.py:28: error: Expression is of type "Any", not "int" [assert-type] +directives_assert_type.py:30: error: "assert_type" expects 2 arguments [misc] +directives_assert_type.py:30: error: Too few arguments for "assert_type" [call-arg] +directives_assert_type.py:31: error: Expression is of type "Literal['']", not "int" [assert-type] +directives_assert_type.py:32: error: "assert_type" expects 2 arguments [misc] +directives_assert_type.py:32: error: Too many arguments for "assert_type" [call-arg] +""" diff --git a/conformance/results/mypy/directives_cast.toml b/conformance/results/mypy/directives_cast.toml new file mode 100644 index 000000000..c0119f44c --- /dev/null +++ b/conformance/results/mypy/directives_cast.toml @@ -0,0 +1,16 @@ +conformant = "Pass" +output = """ +directives_cast.py:15: error: "cast" expects 2 arguments [misc] +directives_cast.py:15: error: All overload variants of "cast" require at least one argument [call-overload] +directives_cast.py:15: note: Possible overload variants: +directives_cast.py:15: note: def [_T] cast(typ: type[_T], val: Any) -> _T +directives_cast.py:15: note: def cast(typ: str, val: Any) -> Any +directives_cast.py:15: note: def cast(typ: object, val: Any) -> Any +directives_cast.py:16: error: Invalid type: try using Literal[1] instead? [valid-type] +directives_cast.py:17: error: "cast" expects 2 arguments [misc] +directives_cast.py:17: error: No overload variant of "cast" matches argument types "Any", "str", "str" [call-overload] +directives_cast.py:17: note: Possible overload variants: +directives_cast.py:17: note: def [_T] cast(typ: type[_T], val: Any) -> _T +directives_cast.py:17: note: def cast(typ: str, val: Any) -> Any +directives_cast.py:17: note: def cast(typ: object, val: Any) -> Any +""" diff --git a/conformance/results/mypy/directives_no_type_check.toml b/conformance/results/mypy/directives_no_type_check.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/mypy/directives_no_type_check.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/mypy/directives_reveal_type.toml b/conformance/results/mypy/directives_reveal_type.toml new file mode 100644 index 000000000..6612496cc --- /dev/null +++ b/conformance/results/mypy/directives_reveal_type.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +output = """ +directives_reveal_type.py:14: note: Revealed type is "Union[builtins.int, builtins.str]" +directives_reveal_type.py:15: note: Revealed type is "builtins.list[builtins.int]" +directives_reveal_type.py:16: note: Revealed type is "Any" +directives_reveal_type.py:17: note: Revealed type is "directives_reveal_type.ForwardReference" +directives_reveal_type.py:19: error: "reveal_type" expects 1 argument [misc] +directives_reveal_type.py:19: error: Too few arguments for "reveal_type" [call-arg] +directives_reveal_type.py:20: error: "reveal_type" expects 1 argument [misc] +directives_reveal_type.py:20: error: Too many arguments for "reveal_type" [call-arg] +""" diff --git a/conformance/results/mypy/directives_type_checking.toml b/conformance/results/mypy/directives_type_checking.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/mypy/directives_type_checking.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/mypy/directives_type_ignore.toml b/conformance/results/mypy/directives_type_ignore.toml new file mode 100644 index 000000000..0657633de --- /dev/null +++ b/conformance/results/mypy/directives_type_ignore.toml @@ -0,0 +1,10 @@ +conformant = "Partial" +notes = """ +Does not honor "# type: ignore" comment if comment includes additional text. +""" +output = """ +directives_type_ignore.py:11: error: Invalid "type: ignore" comment [syntax] +directives_type_ignore.py:11: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_type_ignore.py:14: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_type_ignore.py:14: note: Error code "assignment" not covered by "type: ignore" comment +""" diff --git a/conformance/results/mypy/directives_version_platform.toml b/conformance/results/mypy/directives_version_platform.toml new file mode 100644 index 000000000..fbc4936dc --- /dev/null +++ b/conformance/results/mypy/directives_version_platform.toml @@ -0,0 +1,11 @@ +conformant = "Pass" +notes = """ +Does not understand three-element form of sys.version checks. +Does not understand os.name checks. +""" +output = """ +directives_version_platform.py:19: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_version_platform.py:27: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_version_platform.py:40: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +directives_version_platform.py:45: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment] +""" diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index 59a363e42..ee4b95465 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ version = "mypy 1.8.0" -test_duration = 0.3973560333251953 +test_duration = 0.4210233688354492 diff --git a/conformance/results/pyre/directives_assert_type.toml b/conformance/results/pyre/directives_assert_type.toml new file mode 100644 index 000000000..157333cad --- /dev/null +++ b/conformance/results/pyre/directives_assert_type.toml @@ -0,0 +1,8 @@ +conformant = "Unsupported" +notes = """ +Does not understand "assert_type". +""" +output = """ +directives_assert_type.py:30:4 Missing argument [20]: Call `assert_type` expects argument in position 0. +directives_assert_type.py:32:4 Too many arguments [19]: Call `assert_type` expects 2 positional arguments, 3 were provided. +""" diff --git a/conformance/results/pyre/directives_cast.toml b/conformance/results/pyre/directives_cast.toml new file mode 100644 index 000000000..cbb4ea201 --- /dev/null +++ b/conformance/results/pyre/directives_cast.toml @@ -0,0 +1,6 @@ +conformant = "Pass" +output = """ +directives_cast.py:15:7 Missing argument [20]: Call `cast` expects argument `typ`. +directives_cast.py:16:12 Invalid type [31]: Expression `1` is not a valid type. +directives_cast.py:17:7 Too many arguments [19]: Call `cast` expects 2 positional arguments, 3 were provided. +""" diff --git a/conformance/results/pyre/directives_no_type_check.toml b/conformance/results/pyre/directives_no_type_check.toml new file mode 100644 index 000000000..3dbb72581 --- /dev/null +++ b/conformance/results/pyre/directives_no_type_check.toml @@ -0,0 +1,8 @@ +conformant = "Unsupported" +notes = """ +Does not honor @no_type_check decorator. +""" +output = """ +directives_no_type_check.py:16:12 Unsupported operand [58]: `+` is not supported for operand types `int` and `str`. +directives_no_type_check.py:17:4 Incompatible return type [7]: Expected `None` but got `int`. +""" diff --git a/conformance/results/pyre/directives_reveal_type.toml b/conformance/results/pyre/directives_reveal_type.toml new file mode 100644 index 000000000..fe33115be --- /dev/null +++ b/conformance/results/pyre/directives_reveal_type.toml @@ -0,0 +1,8 @@ +conformant = "Unsupported" +notes = """ +Does not understand reveal_type call. +""" +output = """ +directives_reveal_type.py:19:4 Missing argument [20]: Call `reveal_type` expects argument in position 0. +directives_reveal_type.py:20:4 Too many arguments [19]: Call `reveal_type` expects 1 positional argument, 2 were provided. +""" diff --git a/conformance/results/pyre/directives_type_checking.toml b/conformance/results/pyre/directives_type_checking.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/pyre/directives_type_checking.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/pyre/directives_type_ignore.toml b/conformance/results/pyre/directives_type_ignore.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/pyre/directives_type_ignore.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/pyre/directives_version_platform.toml b/conformance/results/pyre/directives_version_platform.toml new file mode 100644 index 000000000..f8f4a8d02 --- /dev/null +++ b/conformance/results/pyre/directives_version_platform.toml @@ -0,0 +1,11 @@ +conformant = "Partial" +notes = """ +Does not support sys.platform checks. +Does not support os.name checks. +""" +output = """ +directives_version_platform.py:31:4 Incompatible variable type [9]: val5 is declared to have type `int` but is used as type `str`. +directives_version_platform.py:36:4 Incompatible variable type [9]: val6 is declared to have type `int` but is used as type `str`. +directives_version_platform.py:40:4 Incompatible variable type [9]: val7 is declared to have type `int` but is used as type `str`. +directives_version_platform.py:45:4 Incompatible variable type [9]: val8 is declared to have type `int` but is used as type `str`. +""" diff --git a/conformance/results/pyre/version.toml b/conformance/results/pyre/version.toml index 7798424b6..28c2b1fda 100644 --- a/conformance/results/pyre/version.toml +++ b/conformance/results/pyre/version.toml @@ -1,2 +1,2 @@ version = "pyre 0.9.19" -test_duration = 1.5324349403381348 +test_duration = 1.5986709594726562 diff --git a/conformance/results/pyright/directives_assert_type.toml b/conformance/results/pyright/directives_assert_type.toml new file mode 100644 index 000000000..b7039e73c --- /dev/null +++ b/conformance/results/pyright/directives_assert_type.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +output = """ +directives_assert_type.py:27:17 - error: "assert_type" mismatch: expected "int" but received "int | str" (reportGeneralTypeIssues) +directives_assert_type.py:28:17 - error: "assert_type" mismatch: expected "int" but received "Any" (reportGeneralTypeIssues) +directives_assert_type.py:30:5 - error: "assert_type" expects two positional arguments +directives_assert_type.py:31:17 - error: "assert_type" mismatch: expected "int" but received "Literal['']" (reportGeneralTypeIssues) +directives_assert_type.py:32:5 - error: "assert_type" expects two positional arguments +""" diff --git a/conformance/results/pyright/directives_cast.toml b/conformance/results/pyright/directives_cast.toml new file mode 100644 index 000000000..f23fa43ef --- /dev/null +++ b/conformance/results/pyright/directives_cast.toml @@ -0,0 +1,8 @@ +conformant = "Pass" +output = """ +directives_cast.py:15:8 - error: No overloads for "cast" match the provided arguments +  Argument types: () (reportGeneralTypeIssues) +directives_cast.py:16:13 - error: Expected type expression but received "Literal[1]" (reportGeneralTypeIssues) +directives_cast.py:17:8 - error: No overloads for "cast" match the provided arguments +  Argument types: (type[int], Literal[''], Literal['']) (reportGeneralTypeIssues) +""" diff --git a/conformance/results/pyright/directives_no_type_check.toml b/conformance/results/pyright/directives_no_type_check.toml new file mode 100644 index 000000000..b921a6545 --- /dev/null +++ b/conformance/results/pyright/directives_no_type_check.toml @@ -0,0 +1,9 @@ +conformant = "Unsupported" +notes = """ +Intentionally does not honor @no_type_check decorator. +""" +output = """ +directives_no_type_check.py:16:9 - error: Operator "+" not supported for types "int" and "str" (reportGeneralTypeIssues) +directives_no_type_check.py:17:12 - error: Expression of type "Literal[1]" cannot be assigned to return type "None" +  "Literal[1]" is incompatible with "None" (reportGeneralTypeIssues) +""" diff --git a/conformance/results/pyright/directives_reveal_type.toml b/conformance/results/pyright/directives_reveal_type.toml new file mode 100644 index 000000000..aa4078ead --- /dev/null +++ b/conformance/results/pyright/directives_reveal_type.toml @@ -0,0 +1,9 @@ +conformant = "Pass" +output = """ +directives_reveal_type.py:14:17 - information: Type of "a" is "int | str" +directives_reveal_type.py:15:17 - information: Type of "b" is "list[int]" +directives_reveal_type.py:16:17 - information: Type of "c" is "Any" +directives_reveal_type.py:17:17 - information: Type of "d" is "ForwardReference" +directives_reveal_type.py:19:5 - error: Expected a single positional argument for "reveal_type" call +directives_reveal_type.py:20:5 - error: Expected a single positional argument for "reveal_type" call +""" diff --git a/conformance/results/pyright/directives_type_checking.toml b/conformance/results/pyright/directives_type_checking.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/pyright/directives_type_checking.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/pyright/directives_type_ignore.toml b/conformance/results/pyright/directives_type_ignore.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/pyright/directives_type_ignore.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/pyright/directives_version_platform.toml b/conformance/results/pyright/directives_version_platform.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/pyright/directives_version_platform.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/pyright/version.toml b/conformance/results/pyright/version.toml index 059f8d556..4628fb39d 100644 --- a/conformance/results/pyright/version.toml +++ b/conformance/results/pyright/version.toml @@ -1,2 +1,2 @@ version = "pyright 1.1.344" -test_duration = 1.0535659790039062 +test_duration = 1.028623104095459 diff --git a/conformance/results/pytype/directives_assert_type.toml b/conformance/results/pytype/directives_assert_type.toml new file mode 100644 index 000000000..a5584f52d --- /dev/null +++ b/conformance/results/pytype/directives_assert_type.toml @@ -0,0 +1,18 @@ +conformant = "Pass" +output = """ +File "directives_assert_type.py", line 27, in func1: Union[int, str] [assert-type] + Expected: int + Actual: Union[int, str] +File "directives_assert_type.py", line 28, in func1: Any [assert-type] + Expected: int + Actual: Any +File "directives_assert_type.py", line 30, in func1: Function assert_type expects 2 arg(s), got 0 [wrong-arg-count] + Expected: (variable, type) + Actually passed: () +File "directives_assert_type.py", line 31, in func1: str [assert-type] + Expected: int + Actual: str +File "directives_assert_type.py", line 32, in func1: Function assert_type expects 2 arg(s), got 3 [wrong-arg-count] + Expected: (variable, type) + Actually passed: (variable, type, _) +""" diff --git a/conformance/results/pytype/directives_cast.toml b/conformance/results/pytype/directives_cast.toml new file mode 100644 index 000000000..b971ffc15 --- /dev/null +++ b/conformance/results/pytype/directives_cast.toml @@ -0,0 +1,11 @@ +conformant = "Partial" +notes = """ +Does not reject a call to "cast" with additional arguments. +""" +output = """ +File "directives_cast.py", line 15, in : Missing parameter 'typ' in call to function typing.cast [missing-parameter] + Expected: (typ, val) + Actually passed: () +File "directives_cast.py", line 16, in : Invalid type annotation '1' for typing.cast [invalid-annotation] + Not a type +""" diff --git a/conformance/results/pytype/directives_no_type_check.toml b/conformance/results/pytype/directives_no_type_check.toml new file mode 100644 index 000000000..ade858621 --- /dev/null +++ b/conformance/results/pytype/directives_no_type_check.toml @@ -0,0 +1,11 @@ +conformant = "Unsupported" +notes = """ +Does not honor @no_type_check decorator. +""" +output = """ +File "directives_no_type_check.py", line 16, in func1: unsupported operand type(s) for +: int and str [unsupported-operands] + Function __add__ on int expects int +File "directives_no_type_check.py", line 17, in func1: bad return type [bad-return-type] + Expected: None + Actually returned: int +""" diff --git a/conformance/results/pytype/directives_reveal_type.toml b/conformance/results/pytype/directives_reveal_type.toml new file mode 100644 index 000000000..814702713 --- /dev/null +++ b/conformance/results/pytype/directives_reveal_type.toml @@ -0,0 +1,12 @@ +conformant = "Partial" +notes = """ +Does not reject call to reveal_type with zero arguments. +Does not reject call to reveal_type with too many arguments. +""" +output = """ +File "directives_reveal_type.py", line 14, in func1: Union[int, str] [reveal-type] +File "directives_reveal_type.py", line 15, in func1: List[int] [reveal-type] +File "directives_reveal_type.py", line 16, in func1: Any [reveal-type] +File "directives_reveal_type.py", line 17, in func1: ForwardReference [reveal-type] +File "directives_reveal_type.py", line 20, in func1: Union[int, str] [reveal-type] +""" diff --git a/conformance/results/pytype/directives_type_checking.toml b/conformance/results/pytype/directives_type_checking.toml new file mode 100644 index 000000000..2146548eb --- /dev/null +++ b/conformance/results/pytype/directives_type_checking.toml @@ -0,0 +1,3 @@ +conformant = "Pass" +output = """ +""" diff --git a/conformance/results/pytype/directives_type_ignore.toml b/conformance/results/pytype/directives_type_ignore.toml new file mode 100644 index 000000000..3e26df616 --- /dev/null +++ b/conformance/results/pytype/directives_type_ignore.toml @@ -0,0 +1,10 @@ +conformant = "Partial" +notes = """ +Does not honor "# type: ignore" comment if comment includes additional text. +""" +output = """ +File "directives_type_ignore.py", line 11: Stray type comment: ignore - additional stuff [ignored-type-comment] +File "directives_type_ignore.py", line 11, in : Type annotation for y does not match type of assignment [annotation-type-mismatch] + Annotation: int + Assignment: str +""" diff --git a/conformance/results/pytype/directives_version_platform.toml b/conformance/results/pytype/directives_version_platform.toml new file mode 100644 index 000000000..1128de03a --- /dev/null +++ b/conformance/results/pytype/directives_version_platform.toml @@ -0,0 +1,16 @@ +conformant = "Pass" +notes = """ +Does not understand three-element form of sys.version checks. +Does not understand os.name checks. +""" +output = """ +File "directives_version_platform.py", line 27, in : Type annotation for val3 does not match type of assignment [annotation-type-mismatch] + Annotation: int + Assignment: str +File "directives_version_platform.py", line 40, in : Type annotation for val7 does not match type of assignment [annotation-type-mismatch] + Annotation: int + Assignment: str +File "directives_version_platform.py", line 45, in : Type annotation for val8 does not match type of assignment [annotation-type-mismatch] + Annotation: int + Assignment: str +""" diff --git a/conformance/results/pytype/qualifiers_final_decorator.toml b/conformance/results/pytype/qualifiers_final_decorator.toml index c37b7f8ae..ebd9a02b1 100644 --- a/conformance/results/pytype/qualifiers_final_decorator.toml +++ b/conformance/results/pytype/qualifiers_final_decorator.toml @@ -8,9 +8,9 @@ File "qualifiers_final_decorator.py", line 21, in : Cannot subclass fina File "qualifiers_final_decorator.py", line 52, in method4: bad return type [bad-return-type] Expected: str Actually returned: int -File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method4, defined in base class Base2 [final-error] -File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method1, defined in base class Base2 [final-error] File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method3, defined in base class Base2 [final-error] +File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method1, defined in base class Base2 [final-error] +File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method4, defined in base class Base2 [final-error] File "qualifiers_final_decorator.py", line 55, in : Class Derived2 overrides final method method2, defined in base class Base2 [final-error] File "qualifiers_final_decorator.py", line 76, in method4: bad return type [bad-return-type] Expected: str diff --git a/conformance/results/pytype/version.toml b/conformance/results/pytype/version.toml index a10d66c6d..795f91800 100644 --- a/conformance/results/pytype/version.toml +++ b/conformance/results/pytype/version.toml @@ -1,2 +1,2 @@ version = "pytype 2023.12.18" -test_duration = 57.623708963394165 +test_duration = 64.40588402748108 diff --git a/conformance/results/results.html b/conformance/results/results.html index 3aa217afb..117eed873 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -127,7 +127,7 @@

Python Type System Conformance Test Results

-
mypy 1.8.0(0.40sec) +
mypy 1.8.0(0.42sec)
@@ -208,8 +208,18 @@

Python Type System Conformance Test Results

Type narrowing + + + + + + + + +
     narrowing_typeguardPass
+Type checker directives
     directives_assert_typePass
     directives_castPass
     directives_no_type_checkPass
     directives_reveal_typePass
     directives_type_checkingPass
     directives_type_ignorePartialDoes not honor "# type: ignore" comment if comment includes additional text.
     directives_version_platformPassDoes not understand three-element form of sys.version checks.
Does not understand os.name checks.
-
pyright 1.1.344(1.05sec) +
pyright 1.1.344(1.03sec)
@@ -290,8 +300,18 @@

Python Type System Conformance Test Results

Type narrowing + + + + + + + + +
     narrowing_typeguardPass
+Type checker directives
     directives_assert_typePass
     directives_castPass
     directives_no_type_checkUnsupportedIntentionally does not honor @no_type_check decorator.
     directives_reveal_typePass
     directives_type_checkingPass
     directives_type_ignorePass
     directives_version_platformPass
-
pyre 0.9.19(1.53sec) +
pyre 0.9.19(1.60sec)
@@ -372,8 +392,18 @@

Python Type System Conformance Test Results

Type narrowing + + + + + + + + +
     narrowing_typeguardPartialDoes not support `tuple` in `assert_type` call.
Does not reject TypeGuard method with too few parameters.
+Type checker directives
     directives_assert_typeUnsupportedDoes not understand "assert_type".
     directives_castPass
     directives_no_type_checkUnsupportedDoes not honor @no_type_check decorator.
     directives_reveal_typeUnsupportedDoes not understand reveal_type call.
     directives_type_checkingPass
     directives_type_ignorePass
     directives_version_platformPartialDoes not support sys.platform checks.
Does not support os.name checks.
-
pytype 2023.12.18(57.62sec) +
pytype 2023.12.18(64.41sec)
@@ -454,6 +484,16 @@

Python Type System Conformance Test Results

Type narrowing + + + + + + + + +
     narrowing_typeguardPartialDoes not reject TypeGuard method with too few parameters.
+Type checker directives
     directives_assert_typePass
     directives_castPartialDoes not reject a call to "cast" with additional arguments.
     directives_no_type_checkUnsupportedDoes not honor @no_type_check decorator.
     directives_reveal_typePartialDoes not reject call to reveal_type with zero arguments.
Does not reject call to reveal_type with too many arguments.
     directives_type_checkingPass
     directives_type_ignorePartialDoes not honor "# type: ignore" comment if comment includes additional text.
     directives_version_platformPassDoes not understand three-element form of sys.version checks.
Does not understand os.name checks.