Fix _csv.Dialect.__init__ (#12320)

This commit is contained in:
sobolevn
2024-10-03 12:33:56 +03:00
committed by GitHub
parent 848cf9103d
commit d16fe74e1f
3 changed files with 18 additions and 7 deletions

View File

@@ -20,6 +20,8 @@ _QuotingType: TypeAlias = int
class Error(Exception): ...
_DialectLike: TypeAlias = str | Dialect | type[Dialect]
class Dialect:
delimiter: str
quotechar: str | None
@@ -29,9 +31,18 @@ class Dialect:
lineterminator: str
quoting: _QuotingType
strict: bool
def __init__(self) -> None: ...
_DialectLike: TypeAlias = str | Dialect | type[Dialect]
def __init__(
self,
dialect: _DialectLike | None = ...,
delimiter: str = ",",
doublequote: bool = True,
escapechar: str | None = None,
lineterminator: str = "\r\n",
quotechar: str | None = '"',
quoting: _QuotingType = 0,
skipinitialspace: bool = False,
strict: bool = False,
) -> None: ...
class _reader(Iterator[list[str]]):
@property