From 55eb19d1bdf2a31fd78acd218369458e119bc179 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Sun, 12 Jun 2022 15:02:05 +0100 Subject: [PATCH] Improve `csv.DictReader` (#8061) --- stdlib/csv.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/csv.pyi b/stdlib/csv.pyi index a7c246d25..e9552c759 100644 --- a/stdlib/csv.pyi +++ b/stdlib/csv.pyi @@ -79,7 +79,7 @@ class unix_dialect(Dialect): lineterminator: str quoting: _QuotingType -class DictReader(Generic[_T], Iterator[_DictReadMapping[_T, str]]): +class DictReader(Generic[_T], Iterator[_DictReadMapping[_T | Any, str | Any]]): fieldnames: Sequence[_T] | None restkey: str | None restval: str | None @@ -123,7 +123,7 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T, str]]): strict: bool = ..., ) -> None: ... def __iter__(self: Self) -> Self: ... - def __next__(self) -> _DictReadMapping[_T, str]: ... + def __next__(self) -> _DictReadMapping[_T | Any, str | Any]: ... if sys.version_info >= (3, 12): def __class_getitem__(cls, item: Any) -> GenericAlias: ...