mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
xml.etree.ElementInclude: update include for py39 (#4086)
Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user