|
1 | 1 | conformant = "Partial" |
2 | 2 | notes = """ |
3 | 3 | False positives in examples using constrained type variables. |
| 4 | +Argument 'covariant' to TypeVar not supported. |
| 5 | +False negative for type variables missing from Generic/Protocol base class. |
4 | 6 | False negative for generic metaclass. |
5 | 7 | """ |
6 | 8 | output = """ |
@@ -66,17 +68,41 @@ generics_basic.py:158:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_my |
66 | 68 | m2[0] # E |
67 | 69 | \u001b[1m\u001b[31m~~~~~\u001b[39m\u001b[0m |
68 | 70 |
|
69 | | -generics_basic.py:182:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_my_iterable_any: Iterator[nothing] [assert-type] |
| 71 | +generics_basic.py:162:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Invalid type annotation 'Generic' [invalid-annotation] |
| 72 | +
|
| 73 | +class Bad1(Generic[int]): ... # E |
| 74 | + \u001b[1m\u001b[31m~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 75 | +
|
| 76 | +generics_basic.py:163:12: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: Invalid type annotation 'Protocol' [invalid-annotation] |
| 77 | +
|
| 78 | +class Bad2(Protocol[int]): ... # E |
| 79 | + \u001b[1m\u001b[31m~~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 80 | +
|
| 81 | +generics_basic.py:168:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: argument "covariant" to TypeVar not supported yet [not-supported-yet] |
| 82 | +
|
| 83 | +T_co = TypeVar("T_co", covariant=True) |
| 84 | + \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 85 | +
|
| 86 | +generics_basic.py:169:8: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in <module>: argument "covariant" to TypeVar not supported yet [not-supported-yet] |
| 87 | +
|
| 88 | +S_co = TypeVar("S_co", covariant=True) |
| 89 | + \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m |
| 90 | +
|
| 91 | +generics_basic.py:199:5: \u001b[1m\u001b[31merror\u001b[39m\u001b[0m: in test_my_iterable_any: Iterator[nothing] [assert-type] |
70 | 92 |
|
71 | 93 | assert_type(iter(m), Iterator[Any]) |
72 | 94 | \u001b[1m\u001b[31m~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\u001b[39m\u001b[0m |
73 | 95 |
|
74 | 96 | """ |
75 | 97 | conformance_automated = "Fail" |
76 | 98 | errors_diff = """ |
77 | | -Line 191: Expected 1 errors |
| 99 | +Line 171: Expected 1 errors |
| 100 | +Line 172: Expected 1 errors |
| 101 | +Line 208: Expected 1 errors |
78 | 102 | Line 34: Unexpected errors ['generics_basic.py:34:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in concat: bad return type [bad-return-type]'] |
79 | 103 | Line 67: Unexpected errors ['generics_basic.py:67:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_concat_subtype: MyStr [assert-type]'] |
80 | 104 | Line 68: Unexpected errors ['generics_basic.py:68:17: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_concat_subtype: Function concat was called with the wrong arguments [wrong-arg-types]', 'generics_basic.py:68:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_concat_subtype: Any [assert-type]'] |
81 | | -Line 182: Unexpected errors ['generics_basic.py:182:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_my_iterable_any: Iterator[nothing] [assert-type]'] |
| 105 | +Line 168: Unexpected errors ['generics_basic.py:168:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: argument "covariant" to TypeVar not supported yet [not-supported-yet]'] |
| 106 | +Line 169: Unexpected errors ['generics_basic.py:169:8: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in <module>: argument "covariant" to TypeVar not supported yet [not-supported-yet]'] |
| 107 | +Line 199: Unexpected errors ['generics_basic.py:199:5: \\x1b[1m\\x1b[31merror\\x1b[39m\\x1b[0m: in test_my_iterable_any: Iterator[nothing] [assert-type]'] |
82 | 108 | """ |
0 commit comments