@@ -111,57 +111,107 @@ class RawConfigParser(_Parser):
111
111
112
112
BOOLEAN_STATES : ClassVar [Mapping [str , bool ]] # undocumented
113
113
default_section : str
114
- @overload
115
- def __init__ (
116
- self ,
117
- defaults : Mapping [str , str | None ] | None = None ,
118
- dict_type : type [Mapping [str , str ]] = ...,
119
- * ,
120
- allow_no_value : Literal [True ],
121
- delimiters : Sequence [str ] = ("=" , ":" ),
122
- comment_prefixes : Sequence [str ] = ("#" , ";" ),
123
- inline_comment_prefixes : Sequence [str ] | None = None ,
124
- strict : bool = True ,
125
- empty_lines_in_values : bool = True ,
126
- default_section : str = "DEFAULT" ,
127
- interpolation : Interpolation | None = ...,
128
- converters : _ConvertersMap = ...,
129
- allow_unnamed_section : bool = False ,
130
- ) -> None : ...
131
- @overload
132
- def __init__ (
133
- self ,
134
- defaults : Mapping [str , str | None ] | None ,
135
- dict_type : type [Mapping [str , str ]],
136
- allow_no_value : Literal [True ],
137
- * ,
138
- delimiters : Sequence [str ] = ("=" , ":" ),
139
- comment_prefixes : Sequence [str ] = ("#" , ";" ),
140
- inline_comment_prefixes : Sequence [str ] | None = None ,
141
- strict : bool = True ,
142
- empty_lines_in_values : bool = True ,
143
- default_section : str = "DEFAULT" ,
144
- interpolation : Interpolation | None = ...,
145
- converters : _ConvertersMap = ...,
146
- allow_unnamed_section : bool = False ,
147
- ) -> None : ...
148
- @overload
149
- def __init__ (
150
- self ,
151
- defaults : _Section | None = None ,
152
- dict_type : type [Mapping [str , str ]] = ...,
153
- allow_no_value : bool = False ,
154
- * ,
155
- delimiters : Sequence [str ] = ("=" , ":" ),
156
- comment_prefixes : Sequence [str ] = ("#" , ";" ),
157
- inline_comment_prefixes : Sequence [str ] | None = None ,
158
- strict : bool = True ,
159
- empty_lines_in_values : bool = True ,
160
- default_section : str = "DEFAULT" ,
161
- interpolation : Interpolation | None = ...,
162
- converters : _ConvertersMap = ...,
163
- allow_unnamed_section : bool = False ,
164
- ) -> None : ...
114
+ if sys .version_info >= (3 , 13 ):
115
+ @overload
116
+ def __init__ (
117
+ self ,
118
+ defaults : Mapping [str , str | None ] | None = None ,
119
+ dict_type : type [Mapping [str , str ]] = ...,
120
+ * ,
121
+ allow_no_value : Literal [True ],
122
+ delimiters : Sequence [str ] = ("=" , ":" ),
123
+ comment_prefixes : Sequence [str ] = ("#" , ";" ),
124
+ inline_comment_prefixes : Sequence [str ] | None = None ,
125
+ strict : bool = True ,
126
+ empty_lines_in_values : bool = True ,
127
+ default_section : str = "DEFAULT" ,
128
+ interpolation : Interpolation | None = ...,
129
+ converters : _ConvertersMap = ...,
130
+ allow_unnamed_section : bool = False ,
131
+ ) -> None : ...
132
+ @overload
133
+ def __init__ (
134
+ self ,
135
+ defaults : Mapping [str , str | None ] | None ,
136
+ dict_type : type [Mapping [str , str ]],
137
+ allow_no_value : Literal [True ],
138
+ * ,
139
+ delimiters : Sequence [str ] = ("=" , ":" ),
140
+ comment_prefixes : Sequence [str ] = ("#" , ";" ),
141
+ inline_comment_prefixes : Sequence [str ] | None = None ,
142
+ strict : bool = True ,
143
+ empty_lines_in_values : bool = True ,
144
+ default_section : str = "DEFAULT" ,
145
+ interpolation : Interpolation | None = ...,
146
+ converters : _ConvertersMap = ...,
147
+ allow_unnamed_section : bool = False ,
148
+ ) -> None : ...
149
+ @overload
150
+ def __init__ (
151
+ self ,
152
+ defaults : _Section | None = None ,
153
+ dict_type : type [Mapping [str , str ]] = ...,
154
+ allow_no_value : bool = False ,
155
+ * ,
156
+ delimiters : Sequence [str ] = ("=" , ":" ),
157
+ comment_prefixes : Sequence [str ] = ("#" , ";" ),
158
+ inline_comment_prefixes : Sequence [str ] | None = None ,
159
+ strict : bool = True ,
160
+ empty_lines_in_values : bool = True ,
161
+ default_section : str = "DEFAULT" ,
162
+ interpolation : Interpolation | None = ...,
163
+ converters : _ConvertersMap = ...,
164
+ allow_unnamed_section : bool = False ,
165
+ ) -> None : ...
166
+ else :
167
+ @overload
168
+ def __init__ (
169
+ self ,
170
+ defaults : Mapping [str , str | None ] | None = None ,
171
+ dict_type : type [Mapping [str , str ]] = ...,
172
+ * ,
173
+ allow_no_value : Literal [True ],
174
+ delimiters : Sequence [str ] = ("=" , ":" ),
175
+ comment_prefixes : Sequence [str ] = ("#" , ";" ),
176
+ inline_comment_prefixes : Sequence [str ] | None = None ,
177
+ strict : bool = True ,
178
+ empty_lines_in_values : bool = True ,
179
+ default_section : str = "DEFAULT" ,
180
+ interpolation : Interpolation | None = ...,
181
+ converters : _ConvertersMap = ...,
182
+ ) -> None : ...
183
+ @overload
184
+ def __init__ (
185
+ self ,
186
+ defaults : Mapping [str , str | None ] | None ,
187
+ dict_type : type [Mapping [str , str ]],
188
+ allow_no_value : Literal [True ],
189
+ * ,
190
+ delimiters : Sequence [str ] = ("=" , ":" ),
191
+ comment_prefixes : Sequence [str ] = ("#" , ";" ),
192
+ inline_comment_prefixes : Sequence [str ] | None = None ,
193
+ strict : bool = True ,
194
+ empty_lines_in_values : bool = True ,
195
+ default_section : str = "DEFAULT" ,
196
+ interpolation : Interpolation | None = ...,
197
+ converters : _ConvertersMap = ...,
198
+ ) -> None : ...
199
+ @overload
200
+ def __init__ (
201
+ self ,
202
+ defaults : _Section | None = None ,
203
+ dict_type : type [Mapping [str , str ]] = ...,
204
+ allow_no_value : bool = False ,
205
+ * ,
206
+ delimiters : Sequence [str ] = ("=" , ":" ),
207
+ comment_prefixes : Sequence [str ] = ("#" , ";" ),
208
+ inline_comment_prefixes : Sequence [str ] | None = None ,
209
+ strict : bool = True ,
210
+ empty_lines_in_values : bool = True ,
211
+ default_section : str = "DEFAULT" ,
212
+ interpolation : Interpolation | None = ...,
213
+ converters : _ConvertersMap = ...,
214
+ ) -> None : ...
165
215
def __len__ (self ) -> int : ...
166
216
def __getitem__ (self , key : str ) -> SectionProxy : ...
167
217
def __setitem__ (self , key : str , value : _Section ) -> None : ...
@@ -346,6 +396,7 @@ class MissingSectionHeaderError(ParsingError):
346
396
if sys .version_info >= (3 , 13 ):
347
397
class _UNNAMED_SECTION : ...
348
398
UNNAMED_SECTION : _UNNAMED_SECTION
399
+
349
400
class MultilineContinuationError (ParsingError ):
350
401
lineno : int
351
402
line : str
0 commit comments