xml.etree.ElementInclude: update include for py39 (#4086)

Co-authored-by: hauntsaninja <>
This commit is contained in:
Shantanu
2020-05-26 17:39:36 -07:00
committed by GitHub
parent d313e170b7
commit a94d6511fd

View File

@@ -1,5 +1,4 @@
# Stubs for xml.etree.ElementInclude (Python 3.4)
import sys
from typing import Union, Optional, Callable
from xml.etree.ElementTree import Element
@@ -14,4 +13,7 @@ def default_loader(href: Union[str, bytes, int], parse: str, encoding: Optional[
# TODO: loader is of type default_loader ie it takes a callable that has the
# same signature as default_loader. But default_loader has a keyword argument
# Which can't be represented using Callable...
def include(elem: Element, loader: Optional[Callable[..., Union[str, Element]]] = ...) -> None: ...
if sys.version_info >= (3, 9):
def include(elem: Element, loader: Optional[Callable[..., Union[str, Element]]] = ..., base_url: Optional[str] = ..., max_depth: Optional[int] = ...) -> None: ...
else:
def include(elem: Element, loader: Optional[Callable[..., Union[str, Element]]] = ...) -> None: ...