mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Allow csv module to support both str and unicode types in Python 2 (#1437)
* Replace keys in DictReader with Any
This commit is contained in:
committed by
Jelle Zijlstra
parent
22f47fd478
commit
5a95e19322
@@ -65,7 +65,7 @@ if sys.version_info >= (3, 6):
|
||||
def __iter__(self) -> Iterator[OrderedDict[str, str]]: ...
|
||||
def next(self) -> OrderedDict[str, str]: ...
|
||||
else:
|
||||
class DictReader(Iterator[Dict[str, str]]):
|
||||
class DictReader(Iterator[Dict[Any, str]]):
|
||||
restkey = ... # type: Optional[str]
|
||||
restval = ... # type: Optional[str]
|
||||
reader = ... # type: _reader
|
||||
@@ -75,8 +75,8 @@ else:
|
||||
def __init__(self, f: Iterator[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) -> Iterator[OrderedDict[Any, str]]: ...
|
||||
def next(self) -> OrderedDict[Any, str]: ...
|
||||
|
||||
class DictWriter(object):
|
||||
fieldnames = ... # type: Sequence[str]
|
||||
|
||||
Reference in New Issue
Block a user