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
Modified generics_type_erasure.py test to not require an error when accessing a generic attribute on a class when a subtype could provide specialization for that generic attribute.
Pyright recently made a modification to eliminate a false positive error in this case. See microsoft/pyright#10303 for details. I don't think the conformance test should mandate an error in this case. The spec certainly doesn't say anything about it, and the error is potentially a false positive.
generics_type_erasure.py:38:16 - error: Argument of type "Literal['']" cannot be assigned to parameter "label" of type "int | None" in function "__init__"
7
4
Type "Literal['']" is not assignable to type "int | None"
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Infers Node[Never] instead of Node[Any] when argument is not provided.</p><p>False negative on instance attribute access on type(node).</p></span></div></th>
359
-
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>no error for `type(n1).label`</p></span></div></th>
359
+
<thclass="column col2 conformant">Pass</th>
360
360
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Does not erase unspecified type variables to `Any` prior to `assert_type` handling.</p><p>False negatives on instance attribute access on the type.</p><p>Does not infer type of `DefaultDict` with explicit type parameters on constructor.</p><p>False negatives on assert_type uses.</p></span></div></th>
<thclass="column col2 partially-conformant"><divclass="hover-text">Partial<spanclass="tooltip-text" id="bottom"><p>Incorrectly rejects some recursive type aliases using TypeAliasType.</p><p>Incorrectly rejects the use of a class-scoped TypeVar in a TypeAliasType definition.</p></span></div></th>
<thclass="column col2 not-conformant"><divclass="hover-text">Unsupported<spanclass="tooltip-text" id="bottom"><p>Support for TypeAliasType is not implemented.</p></span></div></th>
496
496
<thclass="column col2 not-conformant"><divclass="hover-text">Unsupported<spanclass="tooltip-text" id="bottom"><p>Support for TypeAliasType is not implemented.</p></span></div></th>
0 commit comments