Skip to content

Commit a3df774

Browse files
committed
remove 2nd example
1 parent ceef46e commit a3df774

14 files changed

+53
-71
lines changed

conformance/results/mypy/callables_kwargs.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
conformant = "Partial"
2-
notes="""
2+
notes = """
33
Allows callable without kwargs to be assigned to callable with unpacked kwargs
4-
Allows unpacked kwargs to be used when invoking function without kwargs
54
"""
65
output = """
76
callables_kwargs.py:22: note: "func1" defined here
@@ -27,6 +26,5 @@ callables_kwargs.py:122: error: Unpack item in ** argument must be a TypedDict
2726
"""
2827
conformance_automated = "Fail"
2928
errors_diff = """
30-
Line 130: Expected 1 errors
31-
Line 138: Expected 1 errors
29+
Line 134: Expected 1 errors
3230
"""

conformance/results/mypy/generics_defaults.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
conformant = "Partial"
22
output = """
33
generics_defaults.py:24: error: "T" cannot appear after "DefaultStrT" in type parameter list because it has no default type [misc]
4-
generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type]
5-
generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type]
6-
generics_defaults.py:38: error: Expression is of type "type[OneDefault[Any, Any]]", not "type[OneDefault[float, bool]]" [assert-type]
7-
generics_defaults.py:45: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[Any, Any, str, int, bool]]" [assert-type]
8-
generics_defaults.py:46: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
4+
generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[DefaultStrT, DefaultIntT]]", not "type[NoNonDefaults[str, int]]" [assert-type]
5+
generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[str, DefaultIntT]]", not "type[NoNonDefaults[str, int]]" [assert-type]
6+
generics_defaults.py:38: error: Expression is of type "type[OneDefault[float, DefaultBoolT]]", not "type[OneDefault[float, bool]]" [assert-type]
7+
generics_defaults.py:45: error: Expression is of type "type[AllTheDefaults[T1, T2, DefaultStrT, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[Any, Any, str, int, bool]]" [assert-type]
8+
generics_defaults.py:46: error: Expression is of type "type[AllTheDefaults[int, complex, DefaultStrT, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
99
generics_defaults.py:50: error: Type application has too few types (expected between 2 and 5) [misc]
10-
generics_defaults.py:52: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
11-
generics_defaults.py:55: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
12-
generics_defaults.py:59: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
13-
generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[Any]]", not "type[Class_ParamSpec[[str, int]]]" [assert-type]
14-
generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*tuple[Any, ...]]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type]
10+
generics_defaults.py:52: error: Expression is of type "type[AllTheDefaults[int, complex, DefaultStrT, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
11+
generics_defaults.py:55: error: Expression is of type "type[AllTheDefaults[int, complex, str, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]
12+
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]
13+
generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[DefaultP]]", not "type[Class_ParamSpec[[str, int]]]" [assert-type]
14+
generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*DefaultTs]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type]
1515
generics_defaults.py:151: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type]
1616
generics_defaults.py:151: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]
1717
generics_defaults.py:152: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]
@@ -25,16 +25,16 @@ errors_diff = """
2525
Line 104: Expected 1 errors
2626
Line 111: Expected 1 errors
2727
Line 138: Expected 1 errors
28-
Line 30: Unexpected errors ['generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type]']
29-
Line 31: Unexpected errors ['generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[Any, Any]]", not "type[NoNonDefaults[str, int]]" [assert-type]']
30-
Line 38: Unexpected errors ['generics_defaults.py:38: error: Expression is of type "type[OneDefault[Any, Any]]", not "type[OneDefault[float, bool]]" [assert-type]']
31-
Line 45: Unexpected errors ['generics_defaults.py:45: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[Any, Any, str, int, bool]]" [assert-type]']
32-
Line 46: Unexpected errors ['generics_defaults.py:46: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
33-
Line 52: Unexpected errors ['generics_defaults.py:52: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
34-
Line 55: Unexpected errors ['generics_defaults.py:55: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
35-
Line 59: Unexpected errors ['generics_defaults.py:59: error: Expression is of type "type[AllTheDefaults[Any, Any, Any, Any, Any]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
36-
Line 79: Unexpected errors ['generics_defaults.py:79: error: Expression is of type "type[Class_ParamSpec[Any]]", not "type[Class_ParamSpec[[str, int]]]" [assert-type]']
37-
Line 94: Unexpected errors ['generics_defaults.py:94: error: Expression is of type "type[Class_TypeVarTuple[*tuple[Any, ...]]]", not "type[Class_TypeVarTuple[str, int]]" [assert-type]']
28+
Line 30: Unexpected errors ['generics_defaults.py:30: error: Expression is of type "type[NoNonDefaults[DefaultStrT, DefaultIntT]]", not "type[NoNonDefaults[str, int]]" [assert-type]']
29+
Line 31: Unexpected errors ['generics_defaults.py:31: error: Expression is of type "type[NoNonDefaults[str, DefaultIntT]]", not "type[NoNonDefaults[str, int]]" [assert-type]']
30+
Line 38: Unexpected errors ['generics_defaults.py:38: error: Expression is of type "type[OneDefault[float, DefaultBoolT]]", not "type[OneDefault[float, bool]]" [assert-type]']
31+
Line 45: Unexpected errors ['generics_defaults.py:45: error: Expression is of type "type[AllTheDefaults[T1, T2, DefaultStrT, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[Any, Any, str, int, bool]]" [assert-type]']
32+
Line 46: Unexpected errors ['generics_defaults.py:46: error: Expression is of type "type[AllTheDefaults[int, complex, DefaultStrT, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
33+
Line 52: Unexpected errors ['generics_defaults.py:52: error: Expression is of type "type[AllTheDefaults[int, complex, DefaultStrT, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
34+
Line 55: Unexpected errors ['generics_defaults.py:55: error: Expression is of type "type[AllTheDefaults[int, complex, str, DefaultIntT, DefaultBoolT]]", not "type[AllTheDefaults[int, complex, str, int, bool]]" [assert-type]']
35+
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]']
36+
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]']
37+
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]']
3838
Line 151: Unexpected errors ['generics_defaults.py:151: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [float, bool]]]" [assert-type]', 'generics_defaults.py:151: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]']
3939
Line 152: Unexpected errors ['generics_defaults.py:152: error: Expression is of type "type[Foo6[*tuple[Any, ...], Any]]", not "type[Foo6[int, str, [bytes]]]" [assert-type]', 'generics_defaults.py:152: error: Can only replace ParamSpec with a parameter types list or another ParamSpec, got "str" [misc]']
4040
Line 166: Unexpected errors ['generics_defaults.py:166: error: Expression is of type "Callable[[Self], Self]", not "Callable[[Foo7[int]], Foo7[int]]" [assert-type]']
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
conformant = "Partial"
22
output = """
3-
generics_defaults_referential.py:23: error: Expression is of type "type[slice[Any, Any, Any]]", not "type[slice[int, int, int | None]]" [assert-type]
3+
generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]
44
generics_defaults_referential.py:37: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type]
55
generics_defaults_referential.py:53: error: Type parameter "Start2T" has a default type that refers to one or more type variables that are out of scope [misc]
6-
generics_defaults_referential.py:94: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[Any, list[Any]]]" [assert-type]
7-
generics_defaults_referential.py:95: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[int, list[int]]]" [assert-type]
6+
generics_defaults_referential.py:94: error: Expression is of type "type[Bar[Z1, ListDefaultT]]", not "type[Bar[Any, list[Any]]]" [assert-type]
7+
generics_defaults_referential.py:95: error: Expression is of type "type[Bar[int, ListDefaultT]]", not "type[Bar[int, list[int]]]" [assert-type]
88
generics_defaults_referential.py:96: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]
99
"""
1010
conformance_automated = "Fail"
@@ -14,8 +14,8 @@ Line 60: Expected 1 errors
1414
Line 68: Expected 1 errors
1515
Line 74: Expected 1 errors
1616
Line 78: Expected 1 errors
17-
Line 23: Unexpected errors ['generics_defaults_referential.py:23: error: Expression is of type "type[slice[Any, Any, Any]]", not "type[slice[int, int, int | None]]" [assert-type]']
18-
Line 94: Unexpected errors ['generics_defaults_referential.py:94: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[Any, list[Any]]]" [assert-type]']
19-
Line 95: Unexpected errors ['generics_defaults_referential.py:95: error: Expression is of type "type[Bar[Any, Any]]", not "type[Bar[int, list[int]]]" [assert-type]']
17+
Line 23: Unexpected errors ['generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type]']
18+
Line 94: Unexpected errors ['generics_defaults_referential.py:94: error: Expression is of type "type[Bar[Z1, ListDefaultT]]", not "type[Bar[Any, list[Any]]]" [assert-type]']
19+
Line 95: Unexpected errors ['generics_defaults_referential.py:95: error: Expression is of type "type[Bar[int, ListDefaultT]]", not "type[Bar[int, list[int]]]" [assert-type]']
2020
Line 96: Unexpected errors ['generics_defaults_referential.py:96: error: Expression is of type "Bar[int, list[Never]]", not "Bar[int, list[int]]" [assert-type]']
2121
"""
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
conformant = "Partial"
22
output = """
33
generics_defaults_specialization.py:30: error: Bad number of arguments for type alias, expected between 0 and 1, given 2 [type-arg]
4-
generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[Any]]", not "type[Bar[str]]" [assert-type]
4+
generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[DefaultStrT]]", not "type[Bar[str]]" [assert-type]
55
generics_defaults_specialization.py:55: error: The type "type[Foo]" is not generic and not indexable [misc]
66
"""
77
conformance_automated = "Fail"
88
errors_diff = """
9-
Line 45: Unexpected errors ['generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[Any]]", not "type[Bar[str]]" [assert-type]']
9+
Line 45: Unexpected errors ['generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[DefaultStrT]]", not "type[Bar[str]]" [assert-type]']
1010
"""

conformance/results/mypy/generics_paramspec_components.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,18 @@ Does not report error when keyword argument is specified between P.args and P.kw
88
output = """
99
generics_paramspec_components.py:17: error: Use "P.args" for variadic "*" parameter [valid-type]
1010
generics_paramspec_components.py:17: error: Use "P.kwargs" for variadic "**" parameter [valid-type]
11+
generics_paramspec_components.py:20: error: ParamSpec components are not allowed here [valid-type]
1112
generics_paramspec_components.py:23: error: Use "P.kwargs" for variadic "**" parameter [valid-type]
13+
generics_paramspec_components.py:26: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" [valid-type]
14+
generics_paramspec_components.py:30: error: ParamSpec "P" is unbound [valid-type]
15+
generics_paramspec_components.py:35: error: ParamSpec components are not allowed here [valid-type]
16+
generics_paramspec_components.py:36: error: ParamSpec components are not allowed here [valid-type]
17+
generics_paramspec_components.py:38: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" [valid-type]
18+
generics_paramspec_components.py:41: error: ParamSpec must have "*args" typed as "P.args" and "**kwargs" typed as "P.kwargs" [valid-type]
1219
generics_paramspec_components.py:49: error: Argument 1 has incompatible type "*P.kwargs"; expected "P.args" [arg-type]
1320
generics_paramspec_components.py:49: error: Argument 2 has incompatible type "**P.args"; expected "P.kwargs" [arg-type]
1421
generics_paramspec_components.py:51: error: Argument 1 has incompatible type "int"; expected "P.args" [arg-type]
22+
generics_paramspec_components.py:60: error: Arguments not allowed after ParamSpec.args [valid-type]
1523
generics_paramspec_components.py:70: error: Argument 1 has incompatible type "*P.args"; expected "int" [arg-type]
1624
generics_paramspec_components.py:70: error: Argument 2 has incompatible type "int"; expected "P.args" [arg-type]
1725
generics_paramspec_components.py:72: error: Argument 1 has incompatible type "*P.args"; expected "int" [arg-type]
@@ -21,14 +29,6 @@ generics_paramspec_components.py:83: error: Argument 3 to "foo" has incompatible
2129
generics_paramspec_components.py:98: error: Argument 2 to "twice" has incompatible type "str"; expected "int" [arg-type]
2230
generics_paramspec_components.py:98: error: Argument 3 to "twice" has incompatible type "int"; expected "str" [arg-type]
2331
"""
24-
conformance_automated = "Fail"
32+
conformance_automated = "Pass"
2533
errors_diff = """
26-
Line 20: Expected 1 errors
27-
Line 26: Expected 1 errors
28-
Line 30: Expected 1 errors
29-
Line 35: Expected 1 errors
30-
Line 36: Expected 1 errors
31-
Line 38: Expected 1 errors
32-
Line 41: Expected 1 errors
33-
Line 60: Expected 1 errors
3434
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "mypy 1.14.1"
1+
version = "mypy 1.15.0"
22
test_duration = 1.2

conformance/results/pyre/callables_kwargs.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ callables_kwargs.py:102:0 Incompatible variable type [9]: v4 is declared to have
1515
callables_kwargs.py:103:0 Incompatible variable type [9]: v5 is declared to have type `TDProtocol5` but is used as type `typing.Callable(func1)[[Keywords(Unpack[TD2])], None]`.
1616
callables_kwargs.py:111:21 Duplicate parameter [65]: Duplicate parameter name `v1`.
1717
callables_kwargs.py:122:12 Invalid type [31]: `Unpack` in kwargs may only be used with typed dictionaries. `Variable[T (bound to TD2)]` is not a typed dictionary.
18-
callables_kwargs.py:130:0 Incompatible variable type [9]: v7 is declared to have type `TDProtocol6` but is used as type `typing.Callable(func7)[[KeywordOnly(v1, int), KeywordOnly(v3, str), KeywordOnly(v2, str, default)], None]`.
19-
callables_kwargs.py:138:4 Missing argument [20]: Call `func7` expects argument `v2` to be a required typed dictionary key, as the corresponding parameter has no default.
18+
callables_kwargs.py:134:0 Incompatible variable type [9]: v7 is declared to have type `TDProtocol6` but is used as type `typing.Callable(func7)[[KeywordOnly(v1, int), KeywordOnly(v3, str), KeywordOnly(v2, str, default)], None]`.
2019
"""
2120
conformance_automated = "Pass"
2221
errors_diff = """
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyre 0.9.23"
2-
test_duration = 8.1
2+
test_duration = 8.3

conformance/results/pyright/callables_kwargs.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
conformant = "Partial"
2-
notes="""
2+
notes = """
33
Allows callable without kwargs to be assigned to callable with unpacked kwargs
4-
Allows unpacked kwargs to be used when invoking function without kwargs
54
"""
65
output = """
76
callables_kwargs.py:28:5 - error: Could not access item in TypedDict
@@ -34,6 +33,5 @@ callables_kwargs.py:122:21 - error: Expected TypedDict type argument for Unpack
3433
"""
3534
conformance_automated = "Fail"
3635
errors_diff = """
37-
Line 130: Expected 1 errors
38-
Line 138: Expected 1 errors
36+
Line 134: Expected 1 errors
3937
"""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version = "pyright 1.1.393"
2-
test_duration = 1.5
2+
test_duration = 1.6

0 commit comments

Comments
 (0)