mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Annotate **kwargs with dictionary value type only (#320)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user