csv: annotate keyword arguments in various functions and methods (#7788)

This commit is contained in:
Alex Waygood
2022-05-08 05:01:20 +01:00
committed by GitHub
parent 4e946b74bf
commit 3ed7e3ba50
3 changed files with 68 additions and 9 deletions

View File

@@ -91,8 +91,15 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T, str]]):
restkey: str | None = ...,
restval: str | None = ...,
dialect: _DialectLike = ...,
*args: Any,
**kwds: Any,
*,
delimiter: str = ...,
quotechar: str | None = ...,
escapechar: str | None = ...,
doublequote: bool = ...,
skipinitialspace: bool = ...,
lineterminator: str = ...,
quoting: _QuotingType = ...,
strict: bool = ...,
) -> None: ...
@overload
def __init__(
@@ -102,8 +109,15 @@ class DictReader(Generic[_T], Iterator[_DictReadMapping[_T, str]]):
restkey: str | None = ...,
restval: str | None = ...,
dialect: _DialectLike = ...,
*args: Any,
**kwds: Any,
*,
delimiter: str = ...,
quotechar: str | None = ...,
escapechar: str | None = ...,
doublequote: bool = ...,
skipinitialspace: bool = ...,
lineterminator: str = ...,
quoting: _QuotingType = ...,
strict: bool = ...,
) -> None: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _DictReadMapping[_T, str]: ...
@@ -120,8 +134,15 @@ class DictWriter(Generic[_T]):
restval: Any | None = ...,
extrasaction: Literal["raise", "ignore"] = ...,
dialect: _DialectLike = ...,
*args: Any,
**kwds: Any,
*,
delimiter: str = ...,
quotechar: str | None = ...,
escapechar: str | None = ...,
doublequote: bool = ...,
skipinitialspace: bool = ...,
lineterminator: str = ...,
quoting: _QuotingType = ...,
strict: bool = ...,
) -> None: ...
if sys.version_info >= (3, 8):
def writeheader(self) -> Any: ...