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

@@ -41,9 +41,45 @@ class _writer:
def writerow(self, row: Iterable[Any]) -> Any: ...
def writerows(self, rows: Iterable[Iterable[Any]]) -> None: ...
def writer(csvfile: SupportsWrite[str], dialect: _DialectLike = ..., **fmtparams: Any) -> _writer: ...
def reader(csvfile: Iterable[str], dialect: _DialectLike = ..., **fmtparams: Any) -> _reader: ...
def register_dialect(name: str, dialect: Any = ..., **fmtparams: Any) -> None: ...
def writer(
csvfile: SupportsWrite[str],
dialect: _DialectLike = ...,
*,
delimiter: str = ...,
quotechar: str | None = ...,
escapechar: str | None = ...,
doublequote: bool = ...,
skipinitialspace: bool = ...,
lineterminator: str = ...,
quoting: _QuotingType = ...,
strict: bool = ...,
) -> _writer: ...
def reader(
csvfile: Iterable[str],
dialect: _DialectLike = ...,
*,
delimiter: str = ...,
quotechar: str | None = ...,
escapechar: str | None = ...,
doublequote: bool = ...,
skipinitialspace: bool = ...,
lineterminator: str = ...,
quoting: _QuotingType = ...,
strict: bool = ...,
) -> _reader: ...
def register_dialect(
name: str,
dialect: Any = ...,
*,
delimiter: str = ...,
quotechar: str | None = ...,
escapechar: str | None = ...,
doublequote: bool = ...,
skipinitialspace: bool = ...,
lineterminator: str = ...,
quoting: _QuotingType = ...,
strict: bool = ...,
) -> None: ...
def unregister_dialect(name: str) -> None: ...
def get_dialect(name: str) -> Dialect: ...
def list_dialects() -> list[str]: ...