Skip to content

Commit 46b01bf

Browse files
configparser: remove unnecessary defaults from overloads (#15641)
These overloads differ from the other overloads only in the presence of the `fallback` parameter. If the parameter is not passed, the other overload should be taken, so `fallback` should be made required on these overloads for clarity.
1 parent f510e6c commit 46b01bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stdlib/configparser.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,19 +289,19 @@ class RawConfigParser(_Parser):
289289
def getint(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> int: ...
290290
@overload
291291
def getint(
292-
self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
292+
self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T
293293
) -> int | _T: ...
294294
@overload
295295
def getfloat(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> float: ...
296296
@overload
297297
def getfloat(
298-
self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
298+
self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T
299299
) -> float | _T: ...
300300
@overload
301301
def getboolean(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> bool: ...
302302
@overload
303303
def getboolean(
304-
self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ...
304+
self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T
305305
) -> bool | _T: ...
306306
def _get_conv(
307307
self,

0 commit comments

Comments
 (0)