-
Notifications
You must be signed in to change notification settings - Fork 293
Expand file tree
/
Copy pathgenerics_paramspec_semantics.toml
More file actions
62 lines (62 loc) · 5.87 KB
/
generics_paramspec_semantics.toml
File metadata and controls
62 lines (62 loc) · 5.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
conformant = "Partial"
notes = """
Constraint solver doesn't find common type for two signatures captured by a single ParamSpec (allowed).
"""
output = """
generics_paramspec_semantics.py:26:6 - error: Expected 2 more positional arguments (reportCallIssue)
generics_paramspec_semantics.py:27:9 - error: Argument of type "Literal['A']" cannot be assigned to parameter "b" of type "bool"
"Literal['A']" is not assignable to "bool" (reportArgumentType)
generics_paramspec_semantics.py:46:17 - error: Argument of type "(y: int, x: str) -> int" cannot be assigned to parameter "y" of type "(**P@func1) -> int" in function "func1"
Type "(y: int, x: str) -> int" is not assignable to type "(x: int, y: str) -> int"
Parameter name mismatch: "x" versus "y"
Parameter name mismatch: "y" versus "x" (reportArgumentType)
generics_paramspec_semantics.py:61:23 - error: Argument of type "(*, y: int) -> int" cannot be assigned to parameter "y" of type "(**P@func1) -> int" in function "func1"
Type "(*, y: int) -> int" is not assignable to type "(*, x: int) -> int"
Extra parameter "y"
Missing keyword parameter "x" (reportArgumentType)
generics_paramspec_semantics.py:98:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str"
"Literal[1]" is not assignable to "str" (reportArgumentType)
generics_paramspec_semantics.py:108:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter "args" of type "bool"
"Literal[1]" is not assignable to "bool" (reportArgumentType)
generics_paramspec_semantics.py:120:4 - error: Argument of type "Literal[1]" cannot be assigned to parameter of type "str"
"Literal[1]" is not assignable to "str" (reportArgumentType)
generics_paramspec_semantics.py:127:2 - error: Argument of type "(x: str) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first"
Type "(x: str) -> int" is not assignable to type "(int, **P@expects_int_first) -> int"
Parameter 1: type "int" is incompatible with type "str"
"int" is not assignable to "str" (reportArgumentType)
generics_paramspec_semantics.py:132:2 - error: Argument of type "(*, x: int) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first"
Type "(*, x: int) -> int" is not assignable to type "(int, **P@expects_int_first) -> int"
Function accepts too many positional parameters; expected 0 but received 1 (reportArgumentType)
generics_paramspec_semantics.py:137:2 - error: Argument of type "(**kwargs: int) -> int" cannot be assigned to parameter "x" of type "(int, **P@expects_int_first) -> int" in function "expects_int_first"
Type "(**kwargs: int) -> int" is not assignable to type "(int, **P@expects_int_first) -> int"
Function accepts too many positional parameters; expected 0 but received 1 (reportArgumentType)
generics_paramspec_semantics.py:150:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]"
"ContravariantParamSpec[(object)]" is not assignable to "ContravariantParamSpec[(int)]"
Type parameter "InP@ContravariantParamSpec" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_semantics.py:158:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]"
"CovariantParamSpec[(int)]" is not assignable to "CovariantParamSpec[(object)]"
Type parameter "OutP@CovariantParamSpec" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
generics_paramspec_semantics.py:161:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)
generics_paramspec_semantics.py:167:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]"
"ContravariantParamSpecOld[(object)]" is not assignable to "ContravariantParamSpecOld[(int)]"
Type parameter "InP@ContravariantParamSpecOld" is invariant, but "(object)" is not the same as "(int)" (reportAssignmentType)
generics_paramspec_semantics.py:170:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)
generics_paramspec_semantics.py:176:50 - error: Type "ContravariantParamSpecOld[(int)]" is not assignable to declared type "ContravariantParamSpecOld[(object)]"
"ContravariantParamSpecOld[(int)]" is not assignable to "ContravariantParamSpecOld[(object)]"
Type parameter "InP@ContravariantParamSpecOld" is invariant, but "(int)" is not the same as "(object)" (reportAssignmentType)
"""
conformance_automated = "Fail"
errors_diff = """
Line 151: Expected 1 errors
Line 159: Expected 1 errors
Line 164: Expected 1 errors
Line 168: Expected 1 errors
Line 173: Expected 1 errors
Line 177: Expected 1 errors
Line 150: Unexpected errors ['generics_paramspec_semantics.py:150:39 - error: Type "ContravariantParamSpec[(object)]" is not assignable to declared type "ContravariantParamSpec[(int)]"']
Line 158: Unexpected errors ['generics_paramspec_semantics.py:158:39 - error: Type "CovariantParamSpec[(int)]" is not assignable to declared type "CovariantParamSpec[(object)]"']
Line 161: Unexpected errors ['generics_paramspec_semantics.py:161:24 - error: "contravariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)']
Line 167: Unexpected errors ['generics_paramspec_semantics.py:167:46 - error: Type "ContravariantParamSpecOld[(object)]" is not assignable to declared type "ContravariantParamSpecOld[(int)]"']
Line 170: Unexpected errors ['generics_paramspec_semantics.py:170:26 - error: "covariant" is unknown parameter to ParamSpec (reportGeneralTypeIssues)']
Line 176: Unexpected errors ['generics_paramspec_semantics.py:176:50 - error: Type "ContravariantParamSpecOld[(int)]" is not assignable to declared type "ContravariantParamSpecOld[(object)]"']
"""