Skip to content
Merged
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
15 changes: 9 additions & 6 deletions stdlib/2and3/csv.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ if sys.version_info >= (3, 6):
dialect = ... # type: _Dialect
line_num = ... # type: int
fieldnames = ... # type: Sequence[str]
def __init__(self, f: Iterator[str], fieldnames: Sequence[str] = ...,
def __init__(self, f: Iterable[str], fieldnames: Sequence[str] = ...,
restkey: Optional[str] = ..., restval: Optional[str] = ..., dialect: _Dialect = ...,
*args: Any, **kwds: Any) -> None: ...
def __iter__(self) -> Iterator[OrderedDict[str, str]]: ...
def next(self) -> OrderedDict[str, str]: ...
def __iter__(self) -> 'DictReader': ...
def __next__(self) -> OrderedDict[str, str]: ...
else:
class DictReader(Iterator[Dict[Any, str]]):
restkey = ... # type: Optional[str]
Expand All @@ -72,11 +72,14 @@ else:
dialect = ... # type: _Dialect
line_num = ... # type: int
fieldnames = ... # type: Sequence[str]
def __init__(self, f: Iterator[str], fieldnames: Sequence[str] = ...,
def __init__(self, f: Iterable[str], fieldnames: Sequence[str] = ...,
restkey: Optional[str] = ..., restval: Optional[str] = ..., dialect: _Dialect = ...,
*args: Any, **kwds: Any) -> None: ...
def __iter__(self) -> Iterator[OrderedDict[Any, str]]: ...
def next(self) -> OrderedDict[Any, str]: ...
def __iter__(self) -> 'DictReader': ...
if sys.version_info >= (3,):
def __next__(self) -> OrderedDict[Any, str]: ...
else:
def next(self) -> OrderedDict[Any, str]: ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if these should be regular dicts on python < 3.6


class DictWriter(object):
fieldnames = ... # type: Sequence[str]
Expand Down