Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)

* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
Akuli
2021-05-15 15:33:39 +03:00
committed by GitHub
parent b0ef85288d
commit 17dcea4a68
106 changed files with 1539 additions and 3275 deletions

View File

@@ -96,7 +96,7 @@ class NonCallableMock(Base, Any): # type: ignore
def assert_not_called(self) -> None: ...
def assert_called_once_with(self, *args: Any, **kwargs: Any) -> None: ...
def _format_mock_failure_message(self, args: Any, kwargs: Any, action: str = ...) -> str: ...
elif sys.version_info >= (3, 5):
else:
def assert_called_with(_mock_self, *args: Any, **kwargs: Any) -> None: ...
def assert_not_called(_mock_self) -> None: ...
def assert_called_once_with(_mock_self, *args: Any, **kwargs: Any) -> None: ...
@@ -104,7 +104,7 @@ class NonCallableMock(Base, Any): # type: ignore
if sys.version_info >= (3, 8):
def assert_called(self) -> None: ...
def assert_called_once(self) -> None: ...
elif sys.version_info >= (3, 6):
else:
def assert_called(_mock_self) -> None: ...
def assert_called_once(_mock_self) -> None: ...
def reset_mock(self, visited: Any = ..., *, return_value: bool = ..., side_effect: bool = ...) -> None: ...