mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Fix an argument to csv.DictReader() (#3339)
From the Lib/csv.py source, 'f' is passed directly to _csv.reader, which expects Iterable[Text]
This commit is contained in:
committed by
Jelle Zijlstra
parent
fc23c8274f
commit
d0beab9b8e
@@ -1,6 +1,6 @@
|
||||
from collections import OrderedDict
|
||||
import sys
|
||||
from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Type, Union
|
||||
from typing import Any, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Text, Type, Union
|
||||
|
||||
from _csv import (_reader,
|
||||
_writer,
|
||||
@@ -64,7 +64,7 @@ class DictReader(Iterator[_DRMapping]):
|
||||
dialect: _Dialect
|
||||
line_num: int
|
||||
fieldnames: Sequence[str]
|
||||
def __init__(self, f: Iterable[str], fieldnames: Sequence[str] = ...,
|
||||
def __init__(self, f: Iterable[Text], fieldnames: Sequence[str] = ...,
|
||||
restkey: Optional[str] = ..., restval: Optional[str] = ..., dialect: _Dialect = ...,
|
||||
*args: Any, **kwds: Any) -> None: ...
|
||||
def __iter__(self) -> DictReader: ...
|
||||
|
||||
Reference in New Issue
Block a user