From 84affcc6d4d3e4ffc52a737d7a23da71770635fe Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 10 Apr 2026 20:26:42 -0700 Subject: [PATCH] configparser: remove unnecessary defaults from overloads 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. --- stdlib/configparser.pyi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/configparser.pyi b/stdlib/configparser.pyi index 1e11088c3ae7..9b3f02324b7f 100644 --- a/stdlib/configparser.pyi +++ b/stdlib/configparser.pyi @@ -289,19 +289,19 @@ class RawConfigParser(_Parser): def getint(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> int: ... @overload def getint( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ... + self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T ) -> int | _T: ... @overload def getfloat(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> float: ... @overload def getfloat( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ... + self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T ) -> float | _T: ... @overload def getboolean(self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None) -> bool: ... @overload def getboolean( - self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T = ... + self, section: _SectionName, option: str, *, raw: bool = False, vars: _Section | None = None, fallback: _T ) -> bool | _T: ... def _get_conv( self,