Skip to content

Commit 4141dd1

Browse files
ilevkivskyiIvan Levkivskyi
and
Ivan Levkivskyi
authored
Few more fixes for issues found by testing on internal codebases (#4876)
Few unrelated (but quite obvious) fixes here. Co-authored-by: Ivan Levkivskyi <[email protected]>
1 parent 85d6df4 commit 4141dd1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

stdlib/2and3/xml/dom/minidom.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from typing import Any, Optional
1+
from typing import Any, Optional, Text, Union
22
from xml.sax.xmlreader import XMLReader
33

44
def parse(file: str, parser: Optional[XMLReader] = ..., bufsize: Optional[int] = ...): ...
5-
def parseString(string: str, parser: Optional[XMLReader] = ...): ...
5+
def parseString(string: Union[bytes, Text], parser: Optional[XMLReader] = ...): ...
66
def __getattr__(name: str) -> Any: ... # incomplete

stdlib/3/concurrent/futures/_base.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ class Executor:
8585
def as_completed(fs: Iterable[Future[_T]], timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...
8686

8787
# Ideally this would be a namedtuple, but mypy doesn't support generic tuple types. See #1976
88-
class DoneAndNotDoneFutures(Sequence[_T]):
88+
class DoneAndNotDoneFutures(Sequence[Set[Future[_T]]]):
8989
done: Set[Future[_T]]
9090
not_done: Set[Future[_T]]
9191
def __new__(_cls, done: Set[Future[_T]], not_done: Set[Future[_T]]) -> DoneAndNotDoneFutures[_T]: ...
9292
def __len__(self) -> int: ...
9393
@overload
94-
def __getitem__(self, i: int) -> _T: ...
94+
def __getitem__(self, i: int) -> Set[Future[_T]]: ...
9595
@overload
9696
def __getitem__(self, s: slice) -> DoneAndNotDoneFutures[_T]: ...
9797

third_party/2and3/markdown/postprocessors.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from . import util
55
def build_postprocessors(md, **kwargs): ...
66

77
class Postprocessor(util.Processor):
8-
def run(self, text) -> None: ...
8+
def run(self, text) -> Any: ...
99

1010
class RawHtmlPostprocessor(Postprocessor):
1111
def isblocklevel(self, html): ...

third_party/2and3/markdown/treeprocessors.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def build_treeprocessors(md, **kwargs): ...
66
def isString(s): ...
77

88
class Treeprocessor(util.Processor):
9-
def run(self, root) -> None: ...
9+
def run(self, root) -> Optional[Any]: ...
1010

1111
class InlineProcessor(Treeprocessor):
1212
inlinePatterns: Any

0 commit comments

Comments
 (0)