From ed8cfbae484af7a7674ded55349da2ada5d93470 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 8 Oct 2025 11:16:09 +0200 Subject: [PATCH 1/2] _csv.pyi argument fixes --- stdlib/_csv.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/_csv.pyi b/stdlib/_csv.pyi index 4128178c18b3..f1916ddc9527 100644 --- a/stdlib/_csv.pyi +++ b/stdlib/_csv.pyi @@ -92,7 +92,7 @@ else: def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ... def writer( - csvfile: SupportsWrite[str], + fileobj: SupportsWrite[str], /, dialect: _DialectLike = "excel", *, @@ -106,7 +106,7 @@ def writer( strict: bool = False, ) -> _writer: ... def reader( - csvfile: Iterable[str], + iterable: Iterable[str], /, dialect: _DialectLike = "excel", *, @@ -121,6 +121,7 @@ def reader( ) -> _reader: ... def register_dialect( name: str, + /, dialect: type[Dialect | csv.Dialect] = ..., *, delimiter: str = ",", From 851e8bbc9fbda14957853c5b50df2044af71f28f Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Wed, 8 Oct 2025 11:27:57 +0200 Subject: [PATCH 2/2] Fix register_dialect --- stdlib/_csv.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/_csv.pyi b/stdlib/_csv.pyi index f1916ddc9527..ea90766afee6 100644 --- a/stdlib/_csv.pyi +++ b/stdlib/_csv.pyi @@ -122,7 +122,7 @@ def reader( def register_dialect( name: str, /, - dialect: type[Dialect | csv.Dialect] = ..., + dialect: type[Dialect | csv.Dialect] | str = "excel", *, delimiter: str = ",", quotechar: str | None = '"',