File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,9 @@ def __init__(
9090 self .index_label = self ._initialize_index_label (index_label )
9191 self .errors = errors
9292 self .quoting = quoting or csvlib .QUOTE_MINIMAL
93- self .quotechar = self ._initialize_quotechar (quotechar )
9493 self .doublequote = doublequote
9594 self .escapechar = escapechar
95+ self .quotechar = self ._initialize_quotechar (quotechar )
9696 self .lineterminator = lineterminator or os .linesep
9797 self .date_format = date_format
9898 self .cols = self ._initialize_columns (cols )
@@ -141,7 +141,7 @@ def _get_index_label_flat(self) -> Sequence[Hashable]:
141141 return ["" ] if index_label is None else [index_label ]
142142
143143 def _initialize_quotechar (self , quotechar : str | None ) -> str | None :
144- if self .quoting != csvlib .QUOTE_NONE :
144+ if self .quoting != csvlib .QUOTE_NONE or self . escapechar is not None :
145145 # prevents crash in _csv
146146 return quotechar
147147 return None
You can’t perform that action at this time.
0 commit comments