From e1e7a44cccf9ced5b5694dab107a0abc2e538d9f Mon Sep 17 00:00:00 2001 From: Martin DeMello Date: Thu, 10 Oct 2019 15:09:20 -0700 Subject: [PATCH] Fix an argument to csv.DictReader() From the Lib/csv.py source, 'f' is passed directly to _csv.reader, which expects Iterable[Text] --- stdlib/2and3/csv.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/csv.pyi b/stdlib/2and3/csv.pyi index 28a35fab9cc0..e8cbf630e9db 100644 --- a/stdlib/2and3/csv.pyi +++ b/stdlib/2and3/csv.pyi @@ -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: ...