Skip to content

Commit d057b49

Browse files
authored
xml.etree: remove pytype workaround (#14602)
1 parent e0f1611 commit d057b49

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

stdlib/xml/etree/ElementTree.pyi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ def canonicalize(
7878
) -> None: ...
7979

8080
# The tag for Element can be set to the Comment or ProcessingInstruction
81-
# functions defined in this module. _ElementCallable could be a recursive
82-
# type, but defining it that way uncovered a bug in pytype.
83-
_ElementCallable: TypeAlias = Callable[..., Element[Any]]
81+
# functions defined in this module.
82+
_ElementCallable: TypeAlias = Callable[..., Element[_ElementCallable]]
8483
_CallableElement: TypeAlias = Element[_ElementCallable]
8584

8685
_Tag = TypeVar("_Tag", default=str, bound=str | _ElementCallable)

0 commit comments

Comments
 (0)