mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
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:
@@ -1,5 +1,4 @@
|
||||
import sys
|
||||
from typing import Any, Iterable, Iterator, List, Optional, Protocol, Sequence, Text, Type, Union
|
||||
from typing import Any, Iterable, Iterator, List, Optional, Protocol, Text, Type, Union
|
||||
|
||||
QUOTE_ALL: int
|
||||
QUOTE_MINIMAL: int
|
||||
@@ -24,20 +23,12 @@ _DialectLike = Union[str, Dialect, Type[Dialect]]
|
||||
class _reader(Iterator[List[str]]):
|
||||
dialect: Dialect
|
||||
line_num: int
|
||||
if sys.version_info >= (3, 0):
|
||||
def __next__(self) -> List[str]: ...
|
||||
else:
|
||||
def next(self) -> List[str]: ...
|
||||
def __next__(self) -> List[str]: ...
|
||||
|
||||
class _writer:
|
||||
dialect: Dialect
|
||||
|
||||
if sys.version_info >= (3, 5):
|
||||
def writerow(self, row: Iterable[Any]) -> Any: ...
|
||||
def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ...
|
||||
else:
|
||||
def writerow(self, row: Sequence[Any]) -> Any: ...
|
||||
def writerows(self, rows: Iterable[Sequence[Any]]) -> None: ...
|
||||
def writerow(self, row: Iterable[Any]) -> Any: ...
|
||||
def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ...
|
||||
|
||||
class _Writer(Protocol):
|
||||
def write(self, s: str) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user