Skip to content

Commit 37d4e4b

Browse files
ekanshulclaude
andcommitted
configparser: allow default_section=None
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent e8b9e19 commit 37d4e4b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

stdlib/configparser.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class RawConfigParser(_Parser):
154154
NONSPACECRE: ClassVar[Pattern[str]] # undocumented
155155

156156
BOOLEAN_STATES: ClassVar[Mapping[str, bool]] # undocumented
157-
default_section: str
157+
default_section: str | None
158158
if sys.version_info >= (3, 13):
159159
@overload
160160
def __init__(
@@ -168,7 +168,7 @@ class RawConfigParser(_Parser):
168168
inline_comment_prefixes: Sequence[str] | None = None,
169169
strict: bool = True,
170170
empty_lines_in_values: bool = True,
171-
default_section: str = "DEFAULT",
171+
default_section: str | None = "DEFAULT",
172172
interpolation: Interpolation | None = ...,
173173
converters: _ConvertersMap = ...,
174174
allow_unnamed_section: bool = False,
@@ -185,7 +185,7 @@ class RawConfigParser(_Parser):
185185
inline_comment_prefixes: Sequence[str] | None = None,
186186
strict: bool = True,
187187
empty_lines_in_values: bool = True,
188-
default_section: str = "DEFAULT",
188+
default_section: str | None = "DEFAULT",
189189
interpolation: Interpolation | None = ...,
190190
converters: _ConvertersMap = ...,
191191
allow_unnamed_section: bool = False,
@@ -202,7 +202,7 @@ class RawConfigParser(_Parser):
202202
inline_comment_prefixes: Sequence[str] | None = None,
203203
strict: bool = True,
204204
empty_lines_in_values: bool = True,
205-
default_section: str = "DEFAULT",
205+
default_section: str | None = "DEFAULT",
206206
interpolation: Interpolation | None = ...,
207207
converters: _ConvertersMap = ...,
208208
allow_unnamed_section: bool = False,
@@ -220,7 +220,7 @@ class RawConfigParser(_Parser):
220220
inline_comment_prefixes: Sequence[str] | None = None,
221221
strict: bool = True,
222222
empty_lines_in_values: bool = True,
223-
default_section: str = "DEFAULT",
223+
default_section: str | None = "DEFAULT",
224224
interpolation: Interpolation | None = ...,
225225
converters: _ConvertersMap = ...,
226226
) -> None: ...
@@ -236,7 +236,7 @@ class RawConfigParser(_Parser):
236236
inline_comment_prefixes: Sequence[str] | None = None,
237237
strict: bool = True,
238238
empty_lines_in_values: bool = True,
239-
default_section: str = "DEFAULT",
239+
default_section: str | None = "DEFAULT",
240240
interpolation: Interpolation | None = ...,
241241
converters: _ConvertersMap = ...,
242242
) -> None: ...
@@ -252,7 +252,7 @@ class RawConfigParser(_Parser):
252252
inline_comment_prefixes: Sequence[str] | None = None,
253253
strict: bool = True,
254254
empty_lines_in_values: bool = True,
255-
default_section: str = "DEFAULT",
255+
default_section: str | None = "DEFAULT",
256256
interpolation: Interpolation | None = ...,
257257
converters: _ConvertersMap = ...,
258258
) -> None: ...

0 commit comments

Comments
 (0)