From c84c13819476d641a504d3f847cf57162de8b96d Mon Sep 17 00:00:00 2001 From: tewe Date: Wed, 29 Jun 2016 17:43:13 +0200 Subject: [PATCH] Annotate **kwargs with dictionary value type only (#320) --- stdlib/2.7/xml/etree/ElementTree.pyi | 4 ++-- stdlib/3.2/xml/etree/ElementTree.pyi | 4 ++-- stdlib/3.3/xml/etree/ElementTree.pyi | 4 ++-- stdlib/3.4/asyncio/events.pyi | 4 ++-- stdlib/3.4/xml/etree/ElementTree.pyi | 4 ++-- stdlib/3.5/xml/etree/ElementTree.pyi | 4 ++-- stdlib/3/xml/etree/ElementTree.pyi | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/stdlib/2.7/xml/etree/ElementTree.pyi b/stdlib/2.7/xml/etree/ElementTree.pyi index d26f0176a..d7c68acb6 100644 --- a/stdlib/2.7/xml/etree/ElementTree.pyi +++ b/stdlib/2.7/xml/etree/ElementTree.pyi @@ -26,7 +26,7 @@ class Element(Sequence['Element']): attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes] text = ... # type: Optional[_str_or_bytes] tail = ... # type: Optional[_str_or_bytes] - def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> None: ... + def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> None: ... def append(self, element: 'Element') -> None: ... def clear(self) -> None: ... def copy(self) -> 'Element': ... @@ -52,7 +52,7 @@ class Element(Sequence['Element']): def __len__(self) -> int: ... def __setitem__(self, index: int, element: 'Element') -> None: ... -def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> Element: ... +def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> Element: ... def Comment(text: _str_or_bytes=...) -> Element: ... def ProcessingInstruction(target: str, text: str=...) -> Element: ... diff --git a/stdlib/3.2/xml/etree/ElementTree.pyi b/stdlib/3.2/xml/etree/ElementTree.pyi index f14ea8747..19675b924 100644 --- a/stdlib/3.2/xml/etree/ElementTree.pyi +++ b/stdlib/3.2/xml/etree/ElementTree.pyi @@ -26,7 +26,7 @@ class Element(Sequence['Element']): attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes] text = ... # type: Optional[_str_or_bytes] tail = ... # type: Optional[_str_or_bytes] - def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> None: ... + def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> None: ... def append(self, subelement: 'Element') -> None: ... def clear(self) -> None: ... def copy(self) -> 'Element': ... @@ -52,7 +52,7 @@ class Element(Sequence['Element']): def __len__(self) -> int: ... def __setitem__(self, index: int, element: 'Element') -> None: ... -def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> Element: ... +def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> Element: ... def Comment(text: _str_or_bytes=...) -> Element: ... def ProcessingInstruction(target: str, text: str=...) -> Element: ... diff --git a/stdlib/3.3/xml/etree/ElementTree.pyi b/stdlib/3.3/xml/etree/ElementTree.pyi index c4e2f56ef..cccf4934d 100644 --- a/stdlib/3.3/xml/etree/ElementTree.pyi +++ b/stdlib/3.3/xml/etree/ElementTree.pyi @@ -20,7 +20,7 @@ class Element(Sequence['Element']): attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes] text = ... # type: Optional[_str_or_bytes] tail = ... # type: Optional[_str_or_bytes] - def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> None: ... + def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> None: ... def append(self, subelement: 'Element') -> None: ... def clear(self) -> None: ... def copy(self) -> 'Element': ... @@ -46,7 +46,7 @@ class Element(Sequence['Element']): def __len__(self) -> int: ... def __setitem__(self, index: int, element: 'Element') -> None: ... -def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> Element: ... +def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> Element: ... def Comment(text: _str_or_bytes=...) -> Element: ... def ProcessingInstruction(target: str, text: str=...) -> Element: ... diff --git a/stdlib/3.4/asyncio/events.pyi b/stdlib/3.4/asyncio/events.pyi index fb7625784..6b4f11afa 100644 --- a/stdlib/3.4/asyncio/events.pyi +++ b/stdlib/3.4/asyncio/events.pyi @@ -102,13 +102,13 @@ class AbstractEventLoop(metaclass=ABCMeta): @abstractmethod def subprocess_shell(self, protocol_factory: Any, cmd: Union[bytes, str], *, stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., - **kwargs: Dict[str, Any]) -> tuple: ... + **kwargs: Any) -> tuple: ... #?? check Any # return (Transport, Protocol) @abstractmethod def subprocess_exec(self, protocol_factory: Any, *args: List[Any], stdin: Any = ..., stdout: Any = ..., stderr: Any = ..., - **kwargs: Dict[str, Any]) -> tuple: ... + **kwargs: Any) -> tuple: ... #?? check Any # return (Transport, Protocol) @abstractmethod diff --git a/stdlib/3.4/xml/etree/ElementTree.pyi b/stdlib/3.4/xml/etree/ElementTree.pyi index 175988213..74e80844b 100644 --- a/stdlib/3.4/xml/etree/ElementTree.pyi +++ b/stdlib/3.4/xml/etree/ElementTree.pyi @@ -20,7 +20,7 @@ class Element(Sequence['Element']): attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes] text = ... # type: Optional[_str_or_bytes] tail = ... # type: Optional[_str_or_bytes] - def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> None: ... + def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> None: ... def append(self, subelement: 'Element') -> None: ... def clear(self) -> None: ... def copy(self) -> 'Element': ... @@ -46,7 +46,7 @@ class Element(Sequence['Element']): def __len__(self) -> int: ... def __setitem__(self, index: int, element: 'Element') -> None: ... -def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> Element: ... +def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> Element: ... def Comment(text: _str_or_bytes=...) -> Element: ... def ProcessingInstruction(target: str, text: str=...) -> Element: ... diff --git a/stdlib/3.5/xml/etree/ElementTree.pyi b/stdlib/3.5/xml/etree/ElementTree.pyi index 175988213..74e80844b 100644 --- a/stdlib/3.5/xml/etree/ElementTree.pyi +++ b/stdlib/3.5/xml/etree/ElementTree.pyi @@ -20,7 +20,7 @@ class Element(Sequence['Element']): attrib = ... # type: Dict[_str_or_bytes, _str_or_bytes] text = ... # type: Optional[_str_or_bytes] tail = ... # type: Optional[_str_or_bytes] - def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> None: ... + def __init__(self, tag: Union[AnyStr, Callable[..., 'Element']], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> None: ... def append(self, subelement: 'Element') -> None: ... def clear(self) -> None: ... def copy(self) -> 'Element': ... @@ -46,7 +46,7 @@ class Element(Sequence['Element']): def __len__(self) -> int: ... def __setitem__(self, index: int, element: 'Element') -> None: ... -def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> Element: ... +def SubElement(parent: Element, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> Element: ... def Comment(text: _str_or_bytes=...) -> Element: ... def ProcessingInstruction(target: str, text: str=...) -> Element: ... diff --git a/stdlib/3/xml/etree/ElementTree.pyi b/stdlib/3/xml/etree/ElementTree.pyi index ed42e4fca..e4be89033 100644 --- a/stdlib/3/xml/etree/ElementTree.pyi +++ b/stdlib/3/xml/etree/ElementTree.pyi @@ -39,8 +39,8 @@ class _ElementInterface(Sequence['_ElementInterface']): def items(self) -> ItemsView[AnyStr, AnyStr]: ... def getiterator(self, tag: Union[str, AnyStr]=...) -> List['_ElementInterface']: ... -def Element(tag: Union[AnyStr, Callable[..., _ElementInterface]], attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> _ElementInterface: ... -def SubElement(parent: _ElementInterface, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: Dict[str, AnyStr]) -> _ElementInterface: ... +def Element(tag: Union[AnyStr, Callable[..., _ElementInterface]], attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> _ElementInterface: ... +def SubElement(parent: _ElementInterface, tag: AnyStr, attrib: Dict[AnyStr, AnyStr]=..., **extra: AnyStr) -> _ElementInterface: ... def Comment(text: _str_or_bytes=...) -> _ElementInterface: ... def ProcessingInstruction(target: str, text: str=...) -> _ElementInterface: ...