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

@@ -1,4 +1,3 @@
import sys
from _typeshed.wsgi import ErrorStream, InputStream, WSGIApplication
from typing import Any, Callable, Iterable, Iterator, NoReturn, Optional
@@ -9,12 +8,8 @@ def validator(application: WSGIApplication) -> WSGIApplication: ...
class InputWrapper:
input: InputStream
def __init__(self, wsgi_input: InputStream) -> None: ...
if sys.version_info >= (3, 0):
def read(self, size: int) -> bytes: ...
def readline(self, size: int = ...) -> bytes: ...
else:
def read(self, size: int = ...) -> bytes: ...
def readline(self) -> bytes: ...
def read(self, size: int) -> bytes: ...
def readline(self, size: int = ...) -> bytes: ...
def readlines(self, hint: int = ...) -> bytes: ...
def __iter__(self) -> Iterable[bytes]: ...
def close(self) -> NoReturn: ...
@@ -44,9 +39,6 @@ class IteratorWrapper:
check_start_response: Optional[bool]
def __init__(self, wsgi_iterator: Iterator[bytes], check_start_response: Optional[bool]) -> None: ...
def __iter__(self) -> IteratorWrapper: ...
if sys.version_info >= (3, 0):
def __next__(self) -> bytes: ...
else:
def next(self) -> bytes: ...
def __next__(self) -> bytes: ...
def close(self) -> None: ...
def __del__(self) -> None: ...