Argument of type "list[li]" cannot be assigned to parameter "children" of type "ChildrenType" in function "__init__"
Type "list[li]" cannot be assigned to type "ChildrenType"
"list[li]" is incompatible with "Tag"
Type "list[li]" cannot be assigned to type "type[Tag]"
"list[li]" is incompatible with "str"
"list[li]" is incompatible with "list[ChildElementType]"
Type parameter "_T@list" is invariant, but "li" is not the same as "ChildElementType"
Consider switching from "list" to "Sequence" which is covariant
"list[li]" is incompatible with "Generator[ChildElementType, None, None]"
Need to check if this is also an issue in mypy.
Sadly switching to Sequnce is not going to work since that covers a number of other types that are intentionally incompatible.
To reproduce:
From pylance:
Need to check if this is also an issue in mypy.
Sadly switching to
Sequnce
is not going to work since that covers a number of other types that are intentionally incompatible.