diff --git a/conformance/results/mypy/constructors_call_new.toml b/conformance/results/mypy/constructors_call_new.toml index 64d15f4b..a325d9e5 100644 --- a/conformance/results/mypy/constructors_call_new.toml +++ b/conformance/results/mypy/constructors_call_new.toml @@ -6,7 +6,7 @@ Does not report errors during binding to cls parameter of __new__ method. """ conformance_automated = "Fail" errors_diff = """ -Line 145: Expected 1 errors +Line 148: Expected 1 errors Line 40: Unexpected errors ['constructors_call_new.py:40: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class3") [misc]'] Line 49: Unexpected errors ['constructors_call_new.py:49: error: Expression is of type "Class3", not "int" [assert-type]', 'constructors_call_new.py:49: error: Missing positional argument "x" in call to "Class3" [call-arg]'] Line 57: Unexpected errors ['constructors_call_new.py:57: error: "__new__" must return a class instance (got "Class4 | Any") [misc]'] diff --git a/conformance/results/mypy/constructors_callable.toml b/conformance/results/mypy/constructors_callable.toml index e492d317..0a73c46b 100644 --- a/conformance/results/mypy/constructors_callable.toml +++ b/conformance/results/mypy/constructors_callable.toml @@ -6,15 +6,15 @@ Does not support __new__ return type that is different from class being construc """ conformance_automated = "Fail" errors_diff = """ -Line 127: Expected 1 errors -Line 144: Expected 1 errors -Line 73: Unexpected errors ['constructors_callable.py:73: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc]'] -Line 78: Unexpected errors ['constructors_callable.py:78: error: Expression is of type "Class4", not "int" [assert-type]'] -Line 100: Unexpected errors ['constructors_callable.py:100: error: Expression is of type "Class5", not "Never" [assert-type]'] -Line 105: Unexpected errors ['constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [assert-type]'] -Line 116: Unexpected errors ['constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]'] -Line 126: Unexpected errors ['constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" [assert-type]', 'constructors_callable.py:126: error: Too few arguments [call-arg]'] -Line 143: Unexpected errors ['constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any" [assert-type]', 'constructors_callable.py:143: error: Too few arguments [call-arg]'] +Line 129: Expected 1 errors +Line 146: Expected 1 errors +Line 74: Unexpected errors ['constructors_callable.py:74: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc]'] +Line 80: Unexpected errors ['constructors_callable.py:80: error: Expression is of type "Class4", not "int" [assert-type]'] +Line 102: Unexpected errors ['constructors_callable.py:102: error: Expression is of type "Class5", not "Never" [assert-type]'] +Line 107: Unexpected errors ['constructors_callable.py:107: error: Expression is of type "Class5", not "Never" [assert-type]'] +Line 118: Unexpected errors ['constructors_callable.py:118: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]'] +Line 128: Unexpected errors ['constructors_callable.py:128: error: Expression is of type "Class6", not "Class6Proxy" [assert-type]', 'constructors_callable.py:128: error: Too few arguments [call-arg]'] +Line 145: Unexpected errors ['constructors_callable.py:145: error: Expression is of type "Class6Any", not "Any" [assert-type]', 'constructors_callable.py:145: error: Too few arguments [call-arg]'] """ output = """ constructors_callable.py:36: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class1" @@ -22,28 +22,28 @@ constructors_callable.py:38: error: Too few arguments [call-arg] constructors_callable.py:39: error: Unexpected keyword argument "y" [call-arg] constructors_callable.py:49: note: Revealed type is "def () -> constructors_callable.Class2" constructors_callable.py:51: error: Too many arguments [call-arg] -constructors_callable.py:63: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class3" -constructors_callable.py:65: error: Too few arguments [call-arg] -constructors_callable.py:66: error: Unexpected keyword argument "y" [call-arg] -constructors_callable.py:67: error: Too many arguments [call-arg] -constructors_callable.py:73: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc] -constructors_callable.py:77: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class4" -constructors_callable.py:78: error: Expression is of type "Class4", not "int" [assert-type] -constructors_callable.py:79: error: Too few arguments [call-arg] -constructors_callable.py:80: error: Unexpected keyword argument "y" [call-arg] -constructors_callable.py:97: note: Revealed type is "def (*args: Any, **kwargs: Any) -> constructors_callable.Class5" -constructors_callable.py:100: error: Expression is of type "Class5", not "Never" [assert-type] -constructors_callable.py:105: error: Expression is of type "Class5", not "Never" [assert-type] -constructors_callable.py:116: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc] -constructors_callable.py:125: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6" -constructors_callable.py:126: error: Expression is of type "Class6", not "Class6Proxy" [assert-type] -constructors_callable.py:126: error: Too few arguments [call-arg] -constructors_callable.py:142: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6Any" -constructors_callable.py:143: error: Expression is of type "Class6Any", not "Any" [assert-type] -constructors_callable.py:143: error: Too few arguments [call-arg] -constructors_callable.py:162: note: Revealed type is "Overload(def (x: builtins.int) -> constructors_callable.Class7[builtins.int], def (x: builtins.str) -> constructors_callable.Class7[builtins.str])" -constructors_callable.py:182: note: Revealed type is "def [T] (x: builtins.list[T`1], y: builtins.list[T`1]) -> constructors_callable.Class8[T`1]" -constructors_callable.py:184: error: Cannot infer function type argument [misc] -constructors_callable.py:193: note: Revealed type is "def [T] (x: builtins.list[T`-1], y: builtins.list[T`-1]) -> constructors_callable.Class9" -constructors_callable.py:195: error: Cannot infer function type argument [misc] +constructors_callable.py:64: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class3" +constructors_callable.py:66: error: Too few arguments [call-arg] +constructors_callable.py:67: error: Unexpected keyword argument "y" [call-arg] +constructors_callable.py:68: error: Too many arguments [call-arg] +constructors_callable.py:74: error: Incompatible return type for "__new__" (returns "int", but must return a subtype of "Class4") [misc] +constructors_callable.py:79: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class4" +constructors_callable.py:80: error: Expression is of type "Class4", not "int" [assert-type] +constructors_callable.py:81: error: Too few arguments [call-arg] +constructors_callable.py:82: error: Unexpected keyword argument "y" [call-arg] +constructors_callable.py:99: note: Revealed type is "def (*args: Any, **kwargs: Any) -> constructors_callable.Class5" +constructors_callable.py:102: error: Expression is of type "Class5", not "Never" [assert-type] +constructors_callable.py:107: error: Expression is of type "Class5", not "Never" [assert-type] +constructors_callable.py:118: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc] +constructors_callable.py:127: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6" +constructors_callable.py:128: error: Expression is of type "Class6", not "Class6Proxy" [assert-type] +constructors_callable.py:128: error: Too few arguments [call-arg] +constructors_callable.py:144: note: Revealed type is "def (x: builtins.int) -> constructors_callable.Class6Any" +constructors_callable.py:145: error: Expression is of type "Class6Any", not "Any" [assert-type] +constructors_callable.py:145: error: Too few arguments [call-arg] +constructors_callable.py:164: note: Revealed type is "Overload(def (x: builtins.int) -> constructors_callable.Class7[builtins.int], def (x: builtins.str) -> constructors_callable.Class7[builtins.str])" +constructors_callable.py:184: note: Revealed type is "def [T] (x: builtins.list[T`1], y: builtins.list[T`1]) -> constructors_callable.Class8[T`1]" +constructors_callable.py:186: error: Cannot infer function type argument [misc] +constructors_callable.py:195: note: Revealed type is "def [T] (x: builtins.list[T`-1], y: builtins.list[T`-1]) -> constructors_callable.Class9" +constructors_callable.py:197: error: Cannot infer function type argument [misc] """ diff --git a/conformance/results/mypy/generics_defaults.toml b/conformance/results/mypy/generics_defaults.toml index ba432041..63ba3c8e 100644 --- a/conformance/results/mypy/generics_defaults.toml +++ b/conformance/results/mypy/generics_defaults.toml @@ -14,16 +14,16 @@ generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[Defa generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*DefaultTs]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type] generics_defaults.py:107: error: TypeVar default must be a subtype of the bound type [misc] generics_defaults.py:114: error: TypeVar default must be one of the constraint types [misc] -generics_defaults.py:131: error: Expression is of type "int", not "Any" [assert-type] -generics_defaults.py:155: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type] -generics_defaults.py:155: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc] -generics_defaults.py:156: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type] +generics_defaults.py:132: error: Expression is of type "int", not "Any" [assert-type] +generics_defaults.py:156: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type] generics_defaults.py:156: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc] -generics_defaults.py:170: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type] +generics_defaults.py:157: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type] +generics_defaults.py:157: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc] +generics_defaults.py:171: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type] """ conformance_automated = "Fail" errors_diff = """ -Line 142: Expected 1 errors +Line 143: Expected 1 errors Line 30: Unexpected errors ['generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[DefaultStrT, DefaultIntT]]", not "type[NoNonDefaults[str, int]]" [assert-type]'] Line 31: Unexpected errors ['generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[str, DefaultIntT]]", not "type[NoNonDefaults[str, int]]" [assert-type]'] Line 38: Unexpected errors ['generics_defaults.py:38: error: Expression is of type "type[OneDefault[float, DefaultBoolT]]", not "type[OneDefault[float, bool]]" [assert-type]'] @@ -34,7 +34,7 @@ Line 55: Unexpected errors ['generics_defaults.py:55: error: Expression is of ty Line 59: Unexpected errors ['generics_defaults.py:59: error: Expression is of type "type[AllTheDefaults[int, complex, str, int, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]'] Line 79: Unexpected errors ['generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[DefaultP]]", not "type[Class_ParamSpec[[str, int]]]" [assert-type]'] Line 94: Unexpected errors ['generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*DefaultTs]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type]'] -Line 155: Unexpected errors ['generics_defaults.py:155: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type]', 'generics_defaults.py:155: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] -Line 156: Unexpected errors ['generics_defaults.py:156: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]', 'generics_defaults.py:156: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] -Line 170: Unexpected errors ['generics_defaults.py:170: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type]'] +Line 156: Unexpected errors ['generics_defaults.py:156: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type]', 'generics_defaults.py:156: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] +Line 157: Unexpected errors ['generics_defaults.py:157: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]', 'generics_defaults.py:157: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]'] +Line 171: Unexpected errors ['generics_defaults.py:171: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type]'] """ diff --git a/conformance/results/mypy/generics_self_basic.toml b/conformance/results/mypy/generics_self_basic.toml index c902871c..2502d0de 100644 --- a/conformance/results/mypy/generics_self_basic.toml +++ b/conformance/results/mypy/generics_self_basic.toml @@ -2,7 +2,7 @@ conformant = "Pass" output = """ generics_self_basic.py:20: error: Incompatible return value type (got "Shape", expected "Self") [return-value] generics_self_basic.py:33: error: Incompatible return value type (got "Shape", expected "Self") [return-value] -generics_self_basic.py:67: error: Self type cannot have type arguments [misc] +generics_self_basic.py:68: error: Self type cannot have type arguments [misc] """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/mypy/generics_self_usage.toml b/conformance/results/mypy/generics_self_usage.toml index 32b70b84..b1385253 100644 --- a/conformance/results/mypy/generics_self_usage.toml +++ b/conformance/results/mypy/generics_self_usage.toml @@ -5,17 +5,17 @@ generics_self_usage.py:76: error: Self type is only allowed in annotations withi generics_self_usage.py:82: error: Method cannot have explicit self annotation and Self type [misc] generics_self_usage.py:82: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var] generics_self_usage.py:82: note: Consider using the upper bound "Foo2" instead -generics_self_usage.py:86: error: Incompatible return value type (got "Foo3", expected "Self") [return-value] -generics_self_usage.py:101: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:87: error: Incompatible return value type (got "Foo3", expected "Self") [return-value] generics_self_usage.py:103: error: Self type is only allowed in annotations within class definition [misc] -generics_self_usage.py:106: error: Self type is only allowed in annotations within class definition [misc] -generics_self_usage.py:106: error: Self type cannot be used in type alias target [misc] -generics_self_usage.py:111: error: Static methods cannot use Self type [misc] -generics_self_usage.py:111: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var] -generics_self_usage.py:111: note: Consider using the upper bound "Base" instead -generics_self_usage.py:116: error: Static methods cannot use Self type [misc] -generics_self_usage.py:121: error: Self type cannot be used in a metaclass [misc] -generics_self_usage.py:125: error: Self type cannot be used in a metaclass [misc] +generics_self_usage.py:105: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:108: error: Self type is only allowed in annotations within class definition [misc] +generics_self_usage.py:108: error: Self type cannot be used in type alias target [misc] +generics_self_usage.py:113: error: Static methods cannot use Self type [misc] +generics_self_usage.py:113: error: A function returning TypeVar should receive at least one argument containing the same TypeVar [type-var] +generics_self_usage.py:113: note: Consider using the upper bound "Base" instead +generics_self_usage.py:118: error: Static methods cannot use Self type [misc] +generics_self_usage.py:123: error: Self type cannot be used in a metaclass [misc] +generics_self_usage.py:127: error: Self type cannot be used in a metaclass [misc] """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/mypy/overloads_definitions.toml b/conformance/results/mypy/overloads_definitions.toml index 82730d4f..80b29a62 100644 --- a/conformance/results/mypy/overloads_definitions.toml +++ b/conformance/results/mypy/overloads_definitions.toml @@ -4,7 +4,7 @@ notes = """ Allows @override to be on all overloads and implementation, instead of just implementation. """ errors_diff = """ -Lines 220, 221, 222, 225, 226: Expected error (tag 'override_impl') +Lines 226, 227, 228, 231, 232: Expected error (tag 'override_impl') """ output = """ overloads_definitions.py:15: error: Single overload definition, multiple required [misc] @@ -12,8 +12,8 @@ overloads_definitions.py:27: error: An overloaded function outside a stub file m overloads_definitions.py:58: error: An overloaded function outside a stub file must have an implementation [no-overload-impl] overloads_definitions.py:71: error: Overload does not consistently use the "@staticmethod" decorator on all function signatures. [misc] overloads_definitions.py:84: error: Overload does not consistently use the "@classmethod" decorator on all function signatures. [misc] -overloads_definitions.py:121: error: @final should be applied only to overload implementation [misc] -overloads_definitions.py:135: error: @final should be applied only to overload implementation [misc] -overloads_definitions.py:175: error: Cannot override final attribute "final_method" (previously declared in base class "Base") [misc] -overloads_definitions.py:190: error: Method "bad_override" is marked as an override, but no base method was found with this name [misc] +overloads_definitions.py:122: error: @final should be applied only to overload implementation [misc] +overloads_definitions.py:137: error: @final should be applied only to overload implementation [misc] +overloads_definitions.py:180: error: Cannot override final attribute "final_method" (previously declared in base class "Base") [misc] +overloads_definitions.py:195: error: Method "bad_override" is marked as an override, but no base method was found with this name [misc] """ diff --git a/conformance/results/mypy/overloads_evaluation.toml b/conformance/results/mypy/overloads_evaluation.toml index 91b04235..4ddeaca2 100644 --- a/conformance/results/mypy/overloads_evaluation.toml +++ b/conformance/results/mypy/overloads_evaluation.toml @@ -8,16 +8,16 @@ Evaluates Any in some cases where overload is not ambiguous. """ conformance_automated = "Fail" errors_diff = """ -Line 134: Unexpected errors ['overloads_evaluation.py:134: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]'] -Line 135: Unexpected errors ['overloads_evaluation.py:135: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] -Line 160: Unexpected errors ['overloads_evaluation.py:160: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]'] -Line 161: Unexpected errors ['overloads_evaluation.py:161: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] -Line 204: Unexpected errors ['overloads_evaluation.py:204: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]'] -Line 205: Unexpected errors ['overloads_evaluation.py:205: error: Expression is of type "int", not "int | str" [assert-type]'] -Line 264: Unexpected errors ['overloads_evaluation.py:264: error: Expression is of type "list[Any]", not "Any" [assert-type]'] -Line 280: Unexpected errors ['overloads_evaluation.py:280: error: Expression is of type "list[Any]", not "Any" [assert-type]'] -Line 301: Unexpected errors ['overloads_evaluation.py:301: error: Expression is of type "Any", not "float" [assert-type]'] -Line 345: Unexpected errors ['overloads_evaluation.py:345: error: Expression is of type "list[Any]", not "Any" [assert-type]'] +Line 135: Unexpected errors ['overloads_evaluation.py:135: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload]'] +Line 136: Unexpected errors ['overloads_evaluation.py:136: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] +Line 161: Unexpected errors ['overloads_evaluation.py:161: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload]'] +Line 162: Unexpected errors ['overloads_evaluation.py:162: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type]'] +Line 205: Unexpected errors ['overloads_evaluation.py:205: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type]'] +Line 206: Unexpected errors ['overloads_evaluation.py:206: error: Expression is of type "int", not "int | str" [assert-type]'] +Line 265: Unexpected errors ['overloads_evaluation.py:265: error: Expression is of type "list[Any]", not "Any" [assert-type]'] +Line 281: Unexpected errors ['overloads_evaluation.py:281: error: Expression is of type "list[Any]", not "Any" [assert-type]'] +Line 303: Unexpected errors ['overloads_evaluation.py:303: error: Expression is of type "Any", not "float" [assert-type]'] +Line 347: Unexpected errors ['overloads_evaluation.py:347: error: Expression is of type "list[Any]", not "Any" [assert-type]'] """ output = """ overloads_evaluation.py:38: error: All overload variants of "example1_1" require at least one argument [call-overload] @@ -32,22 +32,22 @@ overloads_evaluation.py:51: error: No overload variant of "example1_1" matches a overloads_evaluation.py:51: note: Possible overload variants: overloads_evaluation.py:51: note: def example1_1(x: int, y: str) -> int overloads_evaluation.py:51: note: def example1_1(x: str) -> str -overloads_evaluation.py:115: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" [arg-type] -overloads_evaluation.py:115: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" [arg-type] -overloads_evaluation.py:134: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload] -overloads_evaluation.py:134: note: Possible overload variants: -overloads_evaluation.py:134: note: def expand_bool(x: Literal[False]) -> Literal[0] -overloads_evaluation.py:134: note: def expand_bool(x: Literal[True]) -> Literal[1] -overloads_evaluation.py:135: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] -overloads_evaluation.py:160: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload] -overloads_evaluation.py:160: note: Possible overload variants: -overloads_evaluation.py:160: note: def expand_enum(x: Literal[Color.RED]) -> Literal[0] -overloads_evaluation.py:160: note: def expand_enum(x: Literal[Color.BLUE]) -> Literal[1] -overloads_evaluation.py:161: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] -overloads_evaluation.py:204: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type] -overloads_evaluation.py:205: error: Expression is of type "int", not "int | str" [assert-type] -overloads_evaluation.py:264: error: Expression is of type "list[Any]", not "Any" [assert-type] -overloads_evaluation.py:280: error: Expression is of type "list[Any]", not "Any" [assert-type] -overloads_evaluation.py:301: error: Expression is of type "Any", not "float" [assert-type] -overloads_evaluation.py:345: error: Expression is of type "list[Any]", not "Any" [assert-type] +overloads_evaluation.py:116: error: Argument 1 to "example2" has incompatible type "int | str"; expected "int" [arg-type] +overloads_evaluation.py:116: error: Argument 2 to "example2" has incompatible type "int | str"; expected "str" [arg-type] +overloads_evaluation.py:135: error: No overload variant of "expand_bool" matches argument type "bool" [call-overload] +overloads_evaluation.py:135: note: Possible overload variants: +overloads_evaluation.py:135: note: def expand_bool(x: Literal[False]) -> Literal[0] +overloads_evaluation.py:135: note: def expand_bool(x: Literal[True]) -> Literal[1] +overloads_evaluation.py:136: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] +overloads_evaluation.py:161: error: No overload variant of "expand_enum" matches argument type "Color" [call-overload] +overloads_evaluation.py:161: note: Possible overload variants: +overloads_evaluation.py:161: note: def expand_enum(x: Literal[Color.RED]) -> Literal[0] +overloads_evaluation.py:161: note: def expand_enum(x: Literal[Color.BLUE]) -> Literal[1] +overloads_evaluation.py:162: error: Expression is of type "Any", not "Literal[0, 1]" [assert-type] +overloads_evaluation.py:205: error: Argument 1 to "expand_tuple" has incompatible type "tuple[int, int | str]"; expected "tuple[int, int]" [arg-type] +overloads_evaluation.py:206: error: Expression is of type "int", not "int | str" [assert-type] +overloads_evaluation.py:265: error: Expression is of type "list[Any]", not "Any" [assert-type] +overloads_evaluation.py:281: error: Expression is of type "list[Any]", not "Any" [assert-type] +overloads_evaluation.py:303: error: Expression is of type "Any", not "float" [assert-type] +overloads_evaluation.py:347: error: Expression is of type "list[Any]", not "Any" [assert-type] """ diff --git a/conformance/results/pyrefly/constructors_call_new.toml b/conformance/results/pyrefly/constructors_call_new.toml index 690a7213..edef6e5e 100644 --- a/conformance/results/pyrefly/constructors_call_new.toml +++ b/conformance/results/pyrefly/constructors_call_new.toml @@ -4,5 +4,5 @@ errors_diff = """ """ output = """ ERROR constructors_call_new.py:21:13-16: Argument `float` is not assignable to parameter `x` with type `int` in function `Class1.__new__` [bad-argument-type] -ERROR constructors_call_new.py:145:13-15: Argument `type[Class11[str]]` is not assignable to parameter `cls` with type `type[Class11[int]]` in function `Class11.__new__` [bad-argument-type] +ERROR constructors_call_new.py:148:13-15: Argument `type[Class11[str]]` is not assignable to parameter `cls` with type `type[Class11[int]]` in function `Class11.__new__` [bad-argument-type] """ diff --git a/conformance/results/pyrefly/constructors_callable.toml b/conformance/results/pyrefly/constructors_callable.toml index bbfb662d..d3200470 100644 --- a/conformance/results/pyrefly/constructors_callable.toml +++ b/conformance/results/pyrefly/constructors_callable.toml @@ -6,29 +6,29 @@ Converting constructor to callable uses __new__ signature instead of __init__ """ conformance_automated = "Fail" errors_diff = """ -Line 65: Expected 1 errors Line 66: Expected 1 errors Line 67: Expected 1 errors -Line 184: Expected 1 errors -Line 195: Expected 1 errors -Line 62: Unexpected errors ['Argument `type[Class3]` is not assignable to parameter `cb` with type `(*args: Unknown, **kwargs: Unknown) -> Class3` in function `accepts_callable` [bad-argument-type]'] -Line 164: Unexpected errors ['assert_type(Class7[Any], Class7[int]) failed [assert-type]'] -Line 165: Unexpected errors ['assert_type(Class7[Any], Class7[str]) failed [assert-type]', "Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type]"] -Line 183: Unexpected errors ['assert_type(Class8[Any], Class8[str]) failed [assert-type]'] +Line 68: Expected 1 errors +Line 186: Expected 1 errors +Line 197: Expected 1 errors +Line 63: Unexpected errors ['Argument `type[Class3]` is not assignable to parameter `cb` with type `(*args: Unknown, **kwargs: Unknown) -> Class3` in function `accepts_callable` [bad-argument-type]'] +Line 166: Unexpected errors ['assert_type(Class7[Any], Class7[int]) failed [assert-type]'] +Line 167: Unexpected errors ['assert_type(Class7[Any], Class7[str]) failed [assert-type]', "Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type]"] +Line 185: Unexpected errors ['assert_type(Class8[Any], Class8[str]) failed [assert-type]'] """ output = """ ERROR constructors_callable.py:38:3-5: Missing argument `x` [missing-argument] ERROR constructors_callable.py:39:3-8: Missing argument `x` [missing-argument] ERROR constructors_callable.py:39:4-5: Unexpected keyword argument `y` [unexpected-keyword] ERROR constructors_callable.py:51:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR constructors_callable.py:62:23-29: Argument `type[Class3]` is not assignable to parameter `cb` with type `(*args: Unknown, **kwargs: Unknown) -> Class3` in function `accepts_callable` [bad-argument-type] -ERROR constructors_callable.py:79:3-5: Missing argument `x` [missing-argument] -ERROR constructors_callable.py:80:3-8: Missing argument `x` [missing-argument] -ERROR constructors_callable.py:80:4-5: Unexpected keyword argument `y` [unexpected-keyword] -ERROR constructors_callable.py:127:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR constructors_callable.py:144:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] -ERROR constructors_callable.py:164:12-32: assert_type(Class7[Any], Class7[int]) failed [assert-type] -ERROR constructors_callable.py:165:12-33: assert_type(Class7[Any], Class7[str]) failed [assert-type] -ERROR constructors_callable.py:165:16-18: Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type] -ERROR constructors_callable.py:183:12-41: assert_type(Class8[Any], Class8[str]) failed [assert-type] +ERROR constructors_callable.py:63:23-29: Argument `type[Class3]` is not assignable to parameter `cb` with type `(*args: Unknown, **kwargs: Unknown) -> Class3` in function `accepts_callable` [bad-argument-type] +ERROR constructors_callable.py:81:3-5: Missing argument `x` [missing-argument] +ERROR constructors_callable.py:82:3-8: Missing argument `x` [missing-argument] +ERROR constructors_callable.py:82:4-5: Unexpected keyword argument `y` [unexpected-keyword] +ERROR constructors_callable.py:129:4-5: Expected 0 positional arguments, got 1 [bad-argument-count] +ERROR constructors_callable.py:146:8-9: Expected 0 positional arguments, got 1 [bad-argument-count] +ERROR constructors_callable.py:166:12-32: assert_type(Class7[Any], Class7[int]) failed [assert-type] +ERROR constructors_callable.py:167:12-33: assert_type(Class7[Any], Class7[str]) failed [assert-type] +ERROR constructors_callable.py:167:16-18: Argument `Literal['']` is not assignable to parameter `x` with type `int` [bad-argument-type] +ERROR constructors_callable.py:185:12-41: assert_type(Class8[Any], Class8[str]) failed [assert-type] """ diff --git a/conformance/results/pyrefly/generics_defaults.toml b/conformance/results/pyrefly/generics_defaults.toml index 2bef8963..8589ad52 100644 --- a/conformance/results/pyrefly/generics_defaults.toml +++ b/conformance/results/pyrefly/generics_defaults.toml @@ -4,14 +4,14 @@ Defaults are not bound by attribute access """ conformance_automated = "Fail" errors_diff = """ -Line 170: Unexpected errors ['assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type]'] +Line 171: Unexpected errors ['assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type]'] """ output = """ ERROR generics_defaults.py:24:7-31: Type parameter `T` without a default cannot follow type parameter `DefaultStrT` with a default [invalid-type-var] ERROR generics_defaults.py:50:1-20: Expected 5 type arguments for `AllTheDefaults`, got 1 [bad-specialization] ERROR generics_defaults.py:107:51-54: Expected default `int` of `Invalid1` to be assignable to the upper bound of `str` [invalid-type-var] ERROR generics_defaults.py:114:52-55: Expected default `int` of `Invalid2` to be one of the following constraints: `float`, `str` [invalid-type-var] -ERROR generics_defaults.py:131:12-27: assert_type(int, Any) failed [assert-type] -ERROR generics_defaults.py:142:7-11: TypeVar `T5` with a default cannot follow TypeVarTuple `Ts` [invalid-type-var] -ERROR generics_defaults.py:170:12-57: assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type] +ERROR generics_defaults.py:132:12-27: assert_type(int, Any) failed [assert-type] +ERROR generics_defaults.py:143:7-11: TypeVar `T5` with a default cannot follow TypeVarTuple `Ts` [invalid-type-var] +ERROR generics_defaults.py:171:12-57: assert_type([DefaultIntT](Foo7[DefaultIntT]) -> Foo7[DefaultIntT], (Foo7[int]) -> Foo7[int]) failed [assert-type] """ diff --git a/conformance/results/pyrefly/generics_self_basic.toml b/conformance/results/pyrefly/generics_self_basic.toml index 0e72344d..7f9b03ea 100644 --- a/conformance/results/pyrefly/generics_self_basic.toml +++ b/conformance/results/pyrefly/generics_self_basic.toml @@ -8,5 +8,5 @@ Line 20: Expected 1 errors Line 33: Expected 1 errors """ output = """ -ERROR generics_self_basic.py:67:26-35: `type[Self@Container]` is not subscriptable [unsupported-operation] +ERROR generics_self_basic.py:68:26-35: `type[Self@Container]` is not subscriptable [unsupported-operation] """ diff --git a/conformance/results/pyrefly/generics_self_usage.toml b/conformance/results/pyrefly/generics_self_usage.toml index 44c8b560..fc359e78 100644 --- a/conformance/results/pyrefly/generics_self_usage.toml +++ b/conformance/results/pyrefly/generics_self_usage.toml @@ -7,14 +7,14 @@ errors_diff = """ Line 73: Expected 1 errors Line 76: Expected 1 errors Line 82: Expected 1 errors -Line 86: Expected 1 errors -Line 101: Expected 1 errors -Line 106: Expected 1 errors -Line 111: Expected 1 errors -Line 116: Expected 1 errors -Line 121: Expected 1 errors -Line 125: Expected 1 errors +Line 87: Expected 1 errors +Line 103: Expected 1 errors +Line 108: Expected 1 errors +Line 113: Expected 1 errors +Line 118: Expected 1 errors +Line 123: Expected 1 errors +Line 127: Expected 1 errors """ output = """ -ERROR generics_self_usage.py:103:12-16: Invalid base class: `Self` [invalid-inheritance] +ERROR generics_self_usage.py:105:12-16: Invalid base class: `Self` [invalid-inheritance] """ diff --git a/conformance/results/pyrefly/overloads_definitions.toml b/conformance/results/pyrefly/overloads_definitions.toml index 6894d760..4c793b5c 100644 --- a/conformance/results/pyrefly/overloads_definitions.toml +++ b/conformance/results/pyrefly/overloads_definitions.toml @@ -8,11 +8,11 @@ ERROR overloads_definitions.py:59:9-21: Overloaded function must have an impleme ERROR overloads_definitions.py:81:9-14: If `@staticmethod` is present on any overload or the implementation, it should be on every overload and the implementation. [invalid-overload] ERROR overloads_definitions.py:90:9-14: If `@classmethod` is present on any overload or the implementation, it should be on every overload and the implementation. [invalid-overload] ERROR overloads_definitions.py:90:9-14: Implementation signature `(cls: type[Self@C], *args: int | str) -> int | str` does not accept all arguments that overload signature `(self: Self@C, x: str, /) -> str` accepts [inconsistent-overload] -ERROR overloads_definitions.py:123:9-22: `@final` should only be applied to the implementation of an overloaded function. [invalid-overload] -ERROR overloads_definitions.py:137:9-24: `@final` should only be applied to the implementation of an overloaded function. [invalid-overload] -ERROR overloads_definitions.py:142:9-24: `@final` should only be applied to the implementation of an overloaded function. [invalid-overload] -ERROR overloads_definitions.py:176:9-21: `final_method` is declared as final in parent class `Base` [bad-override] -ERROR overloads_definitions.py:191:9-21: Class member `Child.bad_override` is marked as an override, but no parent class has a matching attribute [bad-override] -ERROR overloads_definitions.py:222:9-20: `@override` should only be applied to the implementation of an overloaded function. [invalid-overload] -ERROR overloads_definitions.py:226:9-20: `@override` should only be applied to the implementation of an overloaded function. [invalid-overload] +ERROR overloads_definitions.py:124:9-22: `@final` should only be applied to the implementation of an overloaded function. [invalid-overload] +ERROR overloads_definitions.py:139:9-24: `@final` should only be applied to the implementation of an overloaded function. [invalid-overload] +ERROR overloads_definitions.py:144:9-24: `@final` should only be applied to the implementation of an overloaded function. [invalid-overload] +ERROR overloads_definitions.py:181:9-21: `final_method` is declared as final in parent class `Base` [bad-override] +ERROR overloads_definitions.py:196:9-21: Class member `Child.bad_override` is marked as an override, but no parent class has a matching attribute [bad-override] +ERROR overloads_definitions.py:228:9-20: `@override` should only be applied to the implementation of an overloaded function. [invalid-overload] +ERROR overloads_definitions.py:232:9-20: `@override` should only be applied to the implementation of an overloaded function. [invalid-overload] """ diff --git a/conformance/results/pyrefly/overloads_evaluation.toml b/conformance/results/pyrefly/overloads_evaluation.toml index c1431c34..46549b26 100644 --- a/conformance/results/pyrefly/overloads_evaluation.toml +++ b/conformance/results/pyrefly/overloads_evaluation.toml @@ -5,5 +5,5 @@ output = """ ERROR overloads_evaluation.py:38:11-13: No matching overload found for function `example1_1` called with arguments: () [no-matching-overload] ERROR overloads_evaluation.py:46:11-17: No matching overload found for function `example1_1` called with arguments: (Literal[1], Literal[1]) [no-matching-overload] ERROR overloads_evaluation.py:51:11-14: No matching overload found for function `example1_1` called with arguments: (Literal[1]) [no-matching-overload] -ERROR overloads_evaluation.py:115:13-22: No matching overload found for function `example2` called with arguments: (int | str, int | str, Literal[1]) [no-matching-overload] +ERROR overloads_evaluation.py:116:13-22: No matching overload found for function `example2` called with arguments: (int | str, int | str, Literal[1]) [no-matching-overload] """ diff --git a/conformance/results/pyright/constructors_call_new.toml b/conformance/results/pyright/constructors_call_new.toml index 1585d37d..e2387d4f 100644 --- a/conformance/results/pyright/constructors_call_new.toml +++ b/conformance/results/pyright/constructors_call_new.toml @@ -4,7 +4,7 @@ errors_diff = """ output = """ constructors_call_new.py:21:13 - error: Argument of type "float" cannot be assigned to parameter "x" of type "int" in function "__new__" "float" is not assignable to "int" (reportArgumentType) -constructors_call_new.py:145:1 - error: +constructors_call_new.py:148:1 - error: Could not bind method "__new__" because "type[Class11[str]]" is not assignable to parameter "cls" "type[Class11[str]]" is not assignable to "type[Class11[int]]" Type "type[Class11[str]]" is not assignable to type "type[Class11[int]]" diff --git a/conformance/results/pyright/constructors_callable.toml b/conformance/results/pyright/constructors_callable.toml index 708e4555..4a9c41d5 100644 --- a/conformance/results/pyright/constructors_callable.toml +++ b/conformance/results/pyright/constructors_callable.toml @@ -9,25 +9,25 @@ constructors_callable.py:39:1 - error: Argument missing for parameter "x" (repor constructors_callable.py:39:4 - error: No parameter named "y" (reportCallIssue) constructors_callable.py:49:13 - information: Type of "r2" is "() -> Class2" constructors_callable.py:51:4 - error: Expected 0 positional arguments (reportCallIssue) -constructors_callable.py:63:13 - information: Type of "r3" is "(x: int) -> Class3" -constructors_callable.py:65:1 - error: Argument missing for parameter "x" (reportCallIssue) +constructors_callable.py:64:13 - information: Type of "r3" is "(x: int) -> Class3" constructors_callable.py:66:1 - error: Argument missing for parameter "x" (reportCallIssue) -constructors_callable.py:66:4 - error: No parameter named "y" (reportCallIssue) -constructors_callable.py:67:7 - error: Expected 1 positional argument (reportCallIssue) -constructors_callable.py:77:13 - information: Type of "r4" is "(x: int) -> int" -constructors_callable.py:79:1 - error: Argument missing for parameter "x" (reportCallIssue) -constructors_callable.py:80:1 - error: Argument missing for parameter "x" (reportCallIssue) -constructors_callable.py:80:4 - error: No parameter named "y" (reportCallIssue) -constructors_callable.py:97:13 - information: Type of "r5" is "(...) -> NoReturn" -constructors_callable.py:125:13 - information: Type of "r6" is "() -> Class6Proxy" -constructors_callable.py:127:4 - error: Expected 0 positional arguments (reportCallIssue) -constructors_callable.py:142:13 - information: Type of "r6_any" is "() -> Any" -constructors_callable.py:144:8 - error: Expected 0 positional arguments (reportCallIssue) -constructors_callable.py:162:5 - information: Type of "r7" is "Overload[(x: int) -> Class7[int], (x: str) -> Class7[str]]" -constructors_callable.py:182:13 - information: Type of "r8" is "(x: list[T@Class8], y: list[T@Class8]) -> Class8[T@Class8]" -constructors_callable.py:184:10 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@Class8]" +constructors_callable.py:67:1 - error: Argument missing for parameter "x" (reportCallIssue) +constructors_callable.py:67:4 - error: No parameter named "y" (reportCallIssue) +constructors_callable.py:68:7 - error: Expected 1 positional argument (reportCallIssue) +constructors_callable.py:79:13 - information: Type of "r4" is "(x: int) -> int" +constructors_callable.py:81:1 - error: Argument missing for parameter "x" (reportCallIssue) +constructors_callable.py:82:1 - error: Argument missing for parameter "x" (reportCallIssue) +constructors_callable.py:82:4 - error: No parameter named "y" (reportCallIssue) +constructors_callable.py:99:13 - information: Type of "r5" is "(...) -> NoReturn" +constructors_callable.py:127:13 - information: Type of "r6" is "() -> Class6Proxy" +constructors_callable.py:129:4 - error: Expected 0 positional arguments (reportCallIssue) +constructors_callable.py:144:13 - information: Type of "r6_any" is "() -> Any" +constructors_callable.py:146:8 - error: Expected 0 positional arguments (reportCallIssue) +constructors_callable.py:164:5 - information: Type of "r7" is "Overload[(x: int) -> Class7[int], (x: str) -> Class7[str]]" +constructors_callable.py:184:13 - information: Type of "r8" is "(x: list[T@Class8], y: list[T@Class8]) -> Class8[T@Class8]" +constructors_callable.py:186:10 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@Class8]" "Literal['']" is not assignable to "int" (reportArgumentType) -constructors_callable.py:193:13 - information: Type of "r9" is "(x: list[T@__init__], y: list[T@__init__]) -> Class9" -constructors_callable.py:195:10 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@__init__]" +constructors_callable.py:195:13 - information: Type of "r9" is "(x: list[T@__init__], y: list[T@__init__]) -> Class9" +constructors_callable.py:197:10 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@__init__]" "Literal['']" is not assignable to "int" (reportArgumentType) """ diff --git a/conformance/results/pyright/generics_defaults.toml b/conformance/results/pyright/generics_defaults.toml index 55f1dd65..35fdac0c 100644 --- a/conformance/results/pyright/generics_defaults.toml +++ b/conformance/results/pyright/generics_defaults.toml @@ -4,8 +4,8 @@ generics_defaults.py:24:7 - error: "T" cannot appear after "DefaultStrT" in type generics_defaults.py:50:16 - error: Too few type arguments provided for "AllTheDefaults"; expected 2 but received 1 (reportInvalidTypeArguments) generics_defaults.py:107:51 - error: TypeVar default type must be a subtype of the bound type (reportGeneralTypeIssues) generics_defaults.py:114:52 - error: TypeVar default type must be one of the constrained types (reportGeneralTypeIssues) -generics_defaults.py:131:13 - error: "assert_type" mismatch: expected "Any" but received "int" (reportAssertTypeFailure) -generics_defaults.py:142:7 - error: TypeVar "T5" has a default value and cannot follow TypeVarTuple "Ts" (reportGeneralTypeIssues) +generics_defaults.py:132:13 - error: "assert_type" mismatch: expected "Any" but received "int" (reportAssertTypeFailure) +generics_defaults.py:143:7 - error: TypeVar "T5" has a default value and cannot follow TypeVarTuple "Ts" (reportGeneralTypeIssues) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/generics_self_basic.toml b/conformance/results/pyright/generics_self_basic.toml index 6ce2caef..6b1dc6c5 100644 --- a/conformance/results/pyright/generics_self_basic.toml +++ b/conformance/results/pyright/generics_self_basic.toml @@ -4,7 +4,7 @@ generics_self_basic.py:20:16 - error: Type "Shape" is not assignable to return t Type "Shape" is not assignable to type "Self@Shape" (reportReturnType) generics_self_basic.py:33:16 - error: Type "Shape" is not assignable to return type "Self@Shape" Type "Shape" is not assignable to type "Self@Shape" (reportReturnType) -generics_self_basic.py:67:31 - error: Expected no type arguments for class "Self" (reportInvalidTypeArguments) +generics_self_basic.py:68:31 - error: Expected no type arguments for class "Self" (reportInvalidTypeArguments) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/generics_self_usage.toml b/conformance/results/pyright/generics_self_usage.toml index 95f5ac1a..b3b60961 100644 --- a/conformance/results/pyright/generics_self_usage.toml +++ b/conformance/results/pyright/generics_self_usage.toml @@ -6,16 +6,16 @@ generics_self_usage.py:76:6 - error: "Self" is not valid in this context (report generics_self_usage.py:82:44 - warning: TypeVar "TFoo2" appears only once in generic function signature Use "Foo2" instead (reportInvalidTypeVarUse) generics_self_usage.py:82:54 - error: "Self" cannot be used in a function with a `self` or `cls` parameter that has a type annotation other than "Self" (reportGeneralTypeIssues) -generics_self_usage.py:86:16 - error: Type "Foo3" is not assignable to return type "Self@Foo3" +generics_self_usage.py:87:16 - error: Type "Foo3" is not assignable to return type "Self@Foo3" Type "Foo3" is not assignable to type "Self@Foo3" (reportReturnType) -generics_self_usage.py:101:15 - error: "Self" is not valid in this context (reportGeneralTypeIssues) -generics_self_usage.py:103:12 - error: "Self" is not valid in this context (reportGeneralTypeIssues) -generics_self_usage.py:106:30 - error: "Self" is not valid in this context (reportGeneralTypeIssues) -generics_self_usage.py:111:19 - error: "Self" is not valid in this context (reportGeneralTypeIssues) -generics_self_usage.py:116:31 - error: "Self" is not valid in this context (reportGeneralTypeIssues) -generics_self_usage.py:116:40 - error: "Self" is not valid in this context (reportGeneralTypeIssues) -generics_self_usage.py:121:37 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues) -generics_self_usage.py:125:42 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues) +generics_self_usage.py:103:15 - error: "Self" is not valid in this context (reportGeneralTypeIssues) +generics_self_usage.py:105:12 - error: "Self" is not valid in this context (reportGeneralTypeIssues) +generics_self_usage.py:108:30 - error: "Self" is not valid in this context (reportGeneralTypeIssues) +generics_self_usage.py:113:19 - error: "Self" is not valid in this context (reportGeneralTypeIssues) +generics_self_usage.py:118:31 - error: "Self" is not valid in this context (reportGeneralTypeIssues) +generics_self_usage.py:118:40 - error: "Self" is not valid in this context (reportGeneralTypeIssues) +generics_self_usage.py:123:37 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues) +generics_self_usage.py:127:42 - error: "Self" cannot be used within a metaclass (a subclass of "type") (reportGeneralTypeIssues) """ conformance_automated = "Pass" errors_diff = """ diff --git a/conformance/results/pyright/overloads_definitions.toml b/conformance/results/pyright/overloads_definitions.toml index f7b17e78..e6118e2a 100644 --- a/conformance/results/pyright/overloads_definitions.toml +++ b/conformance/results/pyright/overloads_definitions.toml @@ -8,11 +8,11 @@ overloads_definitions.py:28:5 - error: "func2" is marked as overload, but no imp overloads_definitions.py:59:9 - error: "not_abstract" is marked as overload, but no implementation is provided (reportNoOverloadImplementation) overloads_definitions.py:73:9 - error: Overloads for "func5" use @staticmethod inconsistently (reportInconsistentOverload) overloads_definitions.py:86:9 - error: Overloads for "func6" use @classmethod inconsistently (reportInconsistentOverload) -overloads_definitions.py:123:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload) -overloads_definitions.py:137:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload) -overloads_definitions.py:142:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload) -overloads_definitions.py:181:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride) -overloads_definitions.py:198:9 - error: Method "bad_override" is marked as override, but no base method of same name is present (reportGeneralTypeIssues) -overloads_definitions.py:222:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload) -overloads_definitions.py:226:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload) +overloads_definitions.py:124:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload) +overloads_definitions.py:139:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload) +overloads_definitions.py:144:9 - error: @final decorator should be applied only to the implementation (reportInconsistentOverload) +overloads_definitions.py:186:9 - error: Method "final_method" cannot override final method defined in class "Base" (reportIncompatibleMethodOverride) +overloads_definitions.py:203:9 - error: Method "bad_override" is marked as override, but no base method of same name is present (reportGeneralTypeIssues) +overloads_definitions.py:228:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload) +overloads_definitions.py:232:9 - error: @override decorator should be applied only to the implementation (reportInconsistentOverload) """ diff --git a/conformance/results/pyright/overloads_evaluation.toml b/conformance/results/pyright/overloads_evaluation.toml index 7f7e0dce..7b41dc4e 100644 --- a/conformance/results/pyright/overloads_evaluation.toml +++ b/conformance/results/pyright/overloads_evaluation.toml @@ -4,7 +4,7 @@ Does not evaluate Any in some cases where overload is ambiguous. """ conformance_automated = "Fail" errors_diff = """ -Line 280: Unexpected errors ['overloads_evaluation.py:280:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)'] +Line 281: Unexpected errors ['overloads_evaluation.py:281:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure)'] """ output = """ overloads_evaluation.py:38:1 - error: No overloads for "example1_1" match the provided arguments @@ -13,12 +13,12 @@ overloads_evaluation.py:46:15 - error: Argument of type "Literal[1]" cannot be a "Literal[1]" is not assignable to "str" (reportArgumentType) overloads_evaluation.py:51:12 - error: Argument of type "Literal[1]" cannot be assigned to parameter "x" of type "str" in function "example1_1" "Literal[1]" is not assignable to "str" (reportArgumentType) -overloads_evaluation.py:115:5 - error: No overloads for "example2" match the provided arguments (reportCallIssue) -overloads_evaluation.py:115:14 - error: Argument of type "int | str" cannot be assigned to parameter "x" of type "int" in function "example2" +overloads_evaluation.py:116:5 - error: No overloads for "example2" match the provided arguments (reportCallIssue) +overloads_evaluation.py:116:14 - error: Argument of type "int | str" cannot be assigned to parameter "x" of type "int" in function "example2" Type "int | str" is not assignable to type "int" "str" is not assignable to "int" (reportArgumentType) -overloads_evaluation.py:115:17 - error: Argument of type "int | str" cannot be assigned to parameter "y" of type "int" in function "example2" +overloads_evaluation.py:116:17 - error: Argument of type "int | str" cannot be assigned to parameter "y" of type "int" in function "example2" Type "int | str" is not assignable to type "int" "str" is not assignable to "int" (reportArgumentType) -overloads_evaluation.py:280:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure) +overloads_evaluation.py:281:17 - error: "assert_type" mismatch: expected "Any" but received "list[int]" (reportAssertTypeFailure) """ diff --git a/conformance/results/results.html b/conformance/results/results.html index 22ac1d68..ec5fb551 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -378,7 +378,7 @@
Fails to handle move_first_element_to_last example
Does not report unsafe overlap for runtime_checkable protocol.
Does not report unsafe overlap for runtime_checkable protocol.
Does not check for unsafe overlap in runtime_checkable protocols
Does not support tuple narrowing based on `len()` type guard (optional).
Incorrectly marks a match case as unreachable.