@@ -4,7 +4,9 @@ from _csv import (
4
4
QUOTE_MINIMAL as QUOTE_MINIMAL ,
5
5
QUOTE_NONE as QUOTE_NONE ,
6
6
QUOTE_NONNUMERIC as QUOTE_NONNUMERIC ,
7
+ Dialect as Dialect ,
7
8
Error as Error ,
9
+ _DialectLike ,
8
10
_reader ,
9
11
_writer ,
10
12
field_size_limit as field_size_limit ,
@@ -18,19 +20,8 @@ from _csv import (
18
20
from collections import OrderedDict
19
21
from typing import Any , Dict , Iterable , Iterator , List , Mapping , Optional , Sequence , Text , Type , Union
20
22
21
- _Dialect = Union [str , Dialect , Type [Dialect ]]
22
23
_DictRow = Mapping [str , Any ]
23
24
24
- class Dialect (object ):
25
- delimiter : str
26
- quotechar : Optional [str ]
27
- escapechar : Optional [str ]
28
- doublequote : bool
29
- skipinitialspace : bool
30
- lineterminator : str
31
- quoting : int
32
- def __init__ (self ) -> None : ...
33
-
34
25
class excel (Dialect ):
35
26
delimiter : str
36
27
quotechar : str
@@ -62,7 +53,7 @@ class DictReader(Iterator[_DRMapping]):
62
53
restkey : Optional [str ]
63
54
restval : Optional [str ]
64
55
reader : _reader
65
- dialect : _Dialect
56
+ dialect : _DialectLike
66
57
line_num : int
67
58
fieldnames : Sequence [str ]
68
59
def __init__ (
@@ -71,7 +62,7 @@ class DictReader(Iterator[_DRMapping]):
71
62
fieldnames : Optional [Sequence [str ]] = ...,
72
63
restkey : Optional [str ] = ...,
73
64
restval : Optional [str ] = ...,
74
- dialect : _Dialect = ...,
65
+ dialect : _DialectLike = ...,
75
66
* args : Any ,
76
67
** kwds : Any ,
77
68
) -> None : ...
@@ -92,7 +83,7 @@ class DictWriter(object):
92
83
fieldnames : Iterable [str ],
93
84
restval : Optional [Any ] = ...,
94
85
extrasaction : str = ...,
95
- dialect : _Dialect = ...,
86
+ dialect : _DialectLike = ...,
96
87
* args : Any ,
97
88
** kwds : Any ,
98
89
) -> None : ...
0 commit comments