You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conformance/results/mypy/constructors_callable.toml
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,10 @@ Line 107: Unexpected errors ['constructors_callable.py:107: error: Expression is
15
15
Line 118: Unexpected errors ['constructors_callable.py:118: error: Incompatible return type for "__new__" (returns "Class6Proxy", but must return a subtype of "Class6") [misc]']
16
16
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]']
17
17
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]']
18
+
Line 187: Unexpected errors ['constructors_callable.py:187: error: Expression is of type "Class8[Any]", not "Class8[int | str]" [assert-type]', 'constructors_callable.py:187: error: Cannot infer function type argument [misc]']
19
+
Line 199: Unexpected errors ['constructors_callable.py:199: error: Cannot infer function type argument [misc]']
20
+
Line 215: Unexpected errors ['constructors_callable.py:215: error: Expression is of type "Class10[Any]", not "Class10[int]" [assert-type]', 'constructors_callable.py:215: error: Cannot infer function type argument [misc]']
21
+
Line 229: Unexpected errors ['constructors_callable.py:229: error: Cannot infer function type argument [misc]']
18
22
"""
19
23
output = """
20
24
constructors_callable.py:36: note: Revealed type is "def (x: int) -> constructors_callable.Class1"
@@ -43,7 +47,19 @@ constructors_callable.py:145: error: Expression is of type "Class6Any", not "Any
43
47
constructors_callable.py:145: error: Too few arguments [call-arg]
44
48
constructors_callable.py:164: note: Revealed type is "Overload(def (x: int) -> constructors_callable.Class7[int], def (x: str) -> constructors_callable.Class7[str])"
45
49
constructors_callable.py:184: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class8[T]"
46
-
constructors_callable.py:186: error: Cannot infer function type argument [misc]
47
-
constructors_callable.py:195: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class9"
48
-
constructors_callable.py:197: error: Cannot infer function type argument [misc]
50
+
constructors_callable.py:185: error: Argument 2 has incompatible type "str"; expected "list[str]" [arg-type]
51
+
constructors_callable.py:187: error: Expression is of type "Class8[Any]", not "Class8[int | str]" [assert-type]
52
+
constructors_callable.py:187: error: Cannot infer function type argument [misc]
53
+
constructors_callable.py:196: note: Revealed type is "def [T] (x: list[T], y: list[T]) -> constructors_callable.Class9"
54
+
constructors_callable.py:197: error: Argument 2 has incompatible type "str"; expected "list[str]" [arg-type]
55
+
constructors_callable.py:199: error: Cannot infer function type argument [misc]
56
+
constructors_callable.py:210: note: Revealed type is "def [T_int <: int] (x: list[T_int], y: list[T_int]) -> constructors_callable.Class10[T_int]"
57
+
constructors_callable.py:211: error: Argument 2 has incompatible type "str"; expected "list[int]" [arg-type]
58
+
constructors_callable.py:212: error: Cannot infer function type argument [misc]
59
+
constructors_callable.py:215: error: Expression is of type "Class10[Any]", not "Class10[int]" [assert-type]
60
+
constructors_callable.py:215: error: Cannot infer function type argument [misc]
61
+
constructors_callable.py:224: note: Revealed type is "def [T_int <: int] (x: list[T_int], y: list[T_int]) -> constructors_callable.Class11"
62
+
constructors_callable.py:225: error: Argument 2 has incompatible type "str"; expected "list[int]" [arg-type]
63
+
constructors_callable.py:226: error: Cannot infer function type argument [misc]
64
+
constructors_callable.py:229: error: Cannot infer function type argument [misc]
Copy file name to clipboardExpand all lines: conformance/results/pycroscope/constructors_callable.toml
+19-4Lines changed: 19 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
-
conformance_automated = "Pass"
1
+
conformant = "Partial"
2
+
notes = """
3
+
List literal arguments are inferred in isolation before specialization inference
4
+
"""
5
+
conformance_automated = "Fail"
2
6
errors_diff = """
7
+
Line 187: Unexpected errors ['./constructors_callable.py:187:12: ./constructors_callable.py.Class8[Any[error]] is not equivalent to ./constructors_callable.py.Class8[int | str]', './constructors_callable.py:187:12: Cannot resolve type variables [incompatible_call]']
8
+
Line 199: Unexpected errors ['./constructors_callable.py:199:12: Cannot resolve type variables [incompatible_call]']
3
9
"""
4
10
output = """
5
11
./constructors_callable.py:36:12: Revealed type is '(x: int) -> ./constructors_callable.py.Class1' [reveal_type]
@@ -21,7 +27,16 @@ output = """
21
27
./constructors_callable.py:146:0: Takes 0 positional arguments but 1 were given [incompatible_call]
22
28
./constructors_callable.py:164:4: Revealed type is '(x: ~_Ctor_Class7_T) -> ./constructors_callable.py.Class7[~_Ctor_Class7_T]' [reveal_type]
23
29
./constructors_callable.py:184:12: Revealed type is '(x: list[~T@./constructors_callable.py.Class8], y: list[~T@./constructors_callable.py.Class8]) -> ./constructors_callable.py.Class8[~T@./constructors_callable.py.Class8]' [reveal_type]
24
-
./constructors_callable.py:186:0: Cannot resolve type variables [incompatible_call]
25
-
./constructors_callable.py:195:12: Revealed type is '(x: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__], y: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__]) -> ./constructors_callable.py.Class9' [reveal_type]
26
-
./constructors_callable.py:197:0: Cannot resolve type variables [incompatible_call]
30
+
./constructors_callable.py:185:9: Incompatible argument type for y: expected list[~T@./constructors_callable.py.Class8] but got Literal['not a list'] [incompatible_argument]
31
+
./constructors_callable.py:187:12: ./constructors_callable.py.Class8[Any[error]] is not equivalent to ./constructors_callable.py.Class8[int | str]
32
+
./constructors_callable.py:187:12: Cannot resolve type variables [incompatible_call]
33
+
./constructors_callable.py:196:12: Revealed type is '(x: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__], y: list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__]) -> ./constructors_callable.py.Class9' [reveal_type]
34
+
./constructors_callable.py:197:9: Incompatible argument type for y: expected list[~T@./constructors_callable.py.Class9.__init__.<locals>.__init__] but got Literal['not a list'] [incompatible_argument]
35
+
./constructors_callable.py:199:12: Cannot resolve type variables [incompatible_call]
36
+
./constructors_callable.py:210:12: Revealed type is '(x: list[~T_int@./constructors_callable.py.Class10], y: list[~T_int@./constructors_callable.py.Class10]) -> ./constructors_callable.py.Class10[~T_int@./constructors_callable.py.Class10]' [reveal_type]
37
+
./constructors_callable.py:211:9: Incompatible argument type for y: expected list[~T_int@./constructors_callable.py.Class10] but got Literal['not a list'] [incompatible_argument]
38
+
./constructors_callable.py:212:9: Incompatible argument type for y: expected list[~T_int@./constructors_callable.py.Class10] but got Literal[['']] [incompatible_argument]
39
+
./constructors_callable.py:224:12: Revealed type is '(x: list[~T_int@./constructors_callable.py.Class11.__init__.<locals>.__init__], y: list[~T_int@./constructors_callable.py.Class11.__init__.<locals>.__init__]) -> ./constructors_callable.py.Class11' [reveal_type]
40
+
./constructors_callable.py:225:9: Incompatible argument type for y: expected list[~T_int@./constructors_callable.py.Class11.__init__.<locals>.__init__] but got Literal['not a list'] [incompatible_argument]
41
+
./constructors_callable.py:226:9: Incompatible argument type for y: expected list[~T_int@./constructors_callable.py.Class11.__init__.<locals>.__init__] but got Literal[['']] [incompatible_argument]
ERROR constructors_callable.py:197:9-13: Argument `list[str]` is not assignable to parameter `y` with type `list[int]` [bad-argument-type]
29
+
ERROR constructors_callable.py:185:10-22: Argument `Literal['not a list']` is not assignable to parameter `y` with type `list[Unknown]` [bad-argument-type]
ERROR constructors_callable.py:197:10-22: Argument `Literal['not a list']` is not assignable to parameter `y` with type `list[str]` [bad-argument-type]
33
+
ERROR constructors_callable.py:199:21-25: Argument `list[str]` is not assignable to parameter `y` with type `list[int]` [bad-argument-type]
34
+
ERROR constructors_callable.py:211:10-22: Argument `Literal['not a list']` is not assignable to parameter `y` with type `list[Unknown]` [bad-argument-type]
ERROR constructors_callable.py:225:10-22: Argument `Literal['not a list']` is not assignable to parameter `y` with type `list[int]` [bad-argument-type]
39
+
ERROR constructors_callable.py:226:4-15: `str` is not assignable to upper bound `int` of type variable `T_int` [bad-specialization]
40
+
ERROR constructors_callable.py:226:10-14: Argument `list[str]` is not assignable to parameter `y` with type `list[int]` [bad-argument-type]
Copy file name to clipboardExpand all lines: conformance/results/pyright/constructors_callable.toml
+25-5Lines changed: 25 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
-
conformant = "Pass"
2
-
conformance_automated = "Pass"
1
+
conformant = "Partial"
2
+
notes = """
3
+
List literal arguments are inferred in isolation before specialization inference
4
+
"""
5
+
conformance_automated = "Fail"
3
6
errors_diff = """
7
+
Line 187: Unexpected errors ['constructors_callable.py:187:13 - error: "assert_type" mismatch: expected "Class8[int | str]" but received "Class8[int]" (reportAssertTypeFailure)', 'constructors_callable.py:187:22 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@Class8]"']
8
+
Line 199: Unexpected errors ['constructors_callable.py:199:22 - error: Argument of type "list[str]" cannot be assigned to parameter "y" of type "list[T@__init__]"']
4
9
"""
5
10
output = """
6
11
constructors_callable.py:36:13 - information: Type of "r1" is "(x: int) -> Class1"
@@ -25,9 +30,24 @@ constructors_callable.py:144:13 - information: Type of "r6_any" is "() -> Any"
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not generate a union type for __new__ and __init__ when converting class to callable.</p><p>Does not ignore __init__ based on __new__ return type when converting class to callable.</p><p>Does not support __new__ return type that is different from class being constructed.</p></span></div></th>
831
-
<thclass="column col2 conformant">Pass</th>
832
-
<thclass="column col2 conformant">Pass</th>
831
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>List literal arguments are inferred in isolation before specialization inference</p></span></div></th>
832
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>List literal arguments are inferred in isolation before specialization inference</p></span></div></th>
833
833
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Converting constructor to callable does not preserve class-scoped type params.</p></span></div></th>
834
-
<thclass="column col2 conformant">Pass</th>
835
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not include `__init__` when `__new__` returns `Self`.</p><p>Does not respect `NoReturn` return type on metaclass `__call__`.</p><p>Does not ignore `__init__` when `__new__` returns `Any`.</p><p>Unions overload return types.</p></span></div></th>
834
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>List literal arguments are inferred in isolation before specialization inference</p></span></div></th>
835
+
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not include `__init__` when `__new__` returns `Self`.</p><p>Does not respect `NoReturn` return type on metaclass `__call__`.</p><p>Does not ignore `__init__` when `__new__` returns `Any`.</p><p>Unions overload return types.</p><p>List literal arguments are inferred in isolation before specialization inference</p></span></div></th>
<thclass="column col2 conformant"><divclass="hover-text">Pass*<spanclass="tooltip-text" id="bottom"><p>Does not report inconsistency between __new__ and __init__ (optional).</p></span></div></th>
0 commit comments