diff --git a/stdlib/2and3/xml/dom/minidom.pyi b/stdlib/2and3/xml/dom/minidom.pyi index cb53e949889c..7a6eb192b384 100644 --- a/stdlib/2and3/xml/dom/minidom.pyi +++ b/stdlib/2and3/xml/dom/minidom.pyi @@ -1,6 +1,6 @@ -from typing import Any, Optional +from typing import Any, Optional, Text, Union from xml.sax.xmlreader import XMLReader def parse(file: str, parser: Optional[XMLReader] = ..., bufsize: Optional[int] = ...): ... -def parseString(string: str, parser: Optional[XMLReader] = ...): ... +def parseString(string: Union[bytes, Text], parser: Optional[XMLReader] = ...): ... def __getattr__(name: str) -> Any: ... # incomplete diff --git a/stdlib/3/concurrent/futures/_base.pyi b/stdlib/3/concurrent/futures/_base.pyi index 140f0a9b3142..ca4087948c3e 100644 --- a/stdlib/3/concurrent/futures/_base.pyi +++ b/stdlib/3/concurrent/futures/_base.pyi @@ -85,13 +85,13 @@ class Executor: def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ... # Ideally this would be a namedtuple, but mypy doesn't support generic tuple types. See #1976 -class DoneAndNotDoneFutures(Sequence[_T]): +class DoneAndNotDoneFutures(Sequence[Set[Future[_T]]]): done: Set[Future[_T]] not_done: Set[Future[_T]] def __new__(_cls, done: Set[Future[_T]], not_done: Set[Future[_T]]) -> DoneAndNotDoneFutures[_T]: ... def __len__(self) -> int: ... @overload - def __getitem__(self, i: int) -> _T: ... + def __getitem__(self, i: int) -> Set[Future[_T]]: ... @overload def __getitem__(self, s: slice) -> DoneAndNotDoneFutures[_T]: ... diff --git a/third_party/2and3/markdown/postprocessors.pyi b/third_party/2and3/markdown/postprocessors.pyi index 42cddc124a44..a75d1e89d3ac 100644 --- a/third_party/2and3/markdown/postprocessors.pyi +++ b/third_party/2and3/markdown/postprocessors.pyi @@ -5,7 +5,7 @@ from . import util def build_postprocessors(md, **kwargs): ... class Postprocessor(util.Processor): - def run(self, text) -> None: ... + def run(self, text) -> Any: ... class RawHtmlPostprocessor(Postprocessor): def isblocklevel(self, html): ... diff --git a/third_party/2and3/markdown/treeprocessors.pyi b/third_party/2and3/markdown/treeprocessors.pyi index a213600a6159..a1725a66633b 100644 --- a/third_party/2and3/markdown/treeprocessors.pyi +++ b/third_party/2and3/markdown/treeprocessors.pyi @@ -6,7 +6,7 @@ def build_treeprocessors(md, **kwargs): ... def isString(s): ... class Treeprocessor(util.Processor): - def run(self, root) -> None: ... + def run(self, root) -> Optional[Any]: ... class InlineProcessor(Treeprocessor): inlinePatterns: Any