Skip to content

Few more fixes for issues found by testing on internal codebases #4876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stdlib/2and3/xml/dom/minidom.pyi
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions stdlib/3/concurrent/futures/_base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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]: ...

Expand Down
2 changes: 1 addition & 1 deletion third_party/2and3/markdown/postprocessors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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): ...
Expand Down
2 changes: 1 addition & 1 deletion third_party/2and3/markdown/treeprocessors.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down