Make csv.reader take Iterator[Text] argument instead of Iterator[str]. (#2508)

This commit is contained in:
Siva Chandra
2018-10-05 13:10:41 -07:00
committed by Rebecca Chen
parent 94485f9e4f
commit 1b37ca4297

View File

@@ -1,6 +1,6 @@
import sys
from typing import Any, Iterable, Iterator, List, Optional, Sequence
from typing import Any, Iterable, Iterator, List, Optional, Sequence, Text
QUOTE_ALL = ... # type: int
QUOTE_MINIMAL = ... # type: int
@@ -41,7 +41,7 @@ class _writer:
# TODO: precise type
def writer(csvfile: Any, dialect: Any = ..., **fmtparams: Any) -> _writer: ...
def reader(csvfile: Iterable[str], dialect: Any = ..., **fmtparams: Any) -> _reader: ...
def reader(csvfile: Iterable[Text], dialect: Any = ..., **fmtparams: Any) -> _reader: ...
def register_dialect(name: str, dialect: Any = ..., **fmtparams: Any) -> None: ...
def unregister_dialect(name: str) -> None: ...
def get_dialect(name: str) -> Dialect: ...