xml.etree: remove pytype workaround (#14602)

This commit is contained in:
Stephen Morton
2025-08-20 16:56:16 -07:00
committed by GitHub
parent e0f16117b8
commit d057b490d5
+2 -3
View File
@@ -78,9 +78,8 @@ def canonicalize(
) -> None: ...
# The tag for Element can be set to the Comment or ProcessingInstruction
# functions defined in this module. _ElementCallable could be a recursive
# type, but defining it that way uncovered a bug in pytype.
_ElementCallable: TypeAlias = Callable[..., Element[Any]]
# functions defined in this module.
_ElementCallable: TypeAlias = Callable[..., Element[_ElementCallable]]
_CallableElement: TypeAlias = Element[_ElementCallable]
_Tag = TypeVar("_Tag", default=str, bound=str | _ElementCallable)