[configparser] Fix missing fallback argument in SectionProxy.get (#13559)

Closes: #13556
This commit is contained in:
Sebastian Rittau authored and GitHub committed 2025-02-28 03:33:10 -08:00
1 parent 1bd2a358c9
commit f1b121cf29
2 files changed
+14 -2

No files matched your search

+9 -2
View File
@@ -320,7 +320,14 @@ class SectionProxy(MutableMapping[str, str]):
# This is incompatible with MutableMapping so we ignore the type
@overload # type: ignore[override]
def get(
self, option: str, *, raw: bool = False, vars: _Section | None = None, _impl: Any | None = None, **kwargs: Any
self,
option: str,
fallback: None = None,
*,
raw: bool = False,
vars: _Section | None = None,
_impl: Any | None = None,
**kwargs: Any, # passed to the underlying parser's get() method
) -> str | None: ...
@overload
def get(
@@ -331,7 +338,7 @@ class SectionProxy(MutableMapping[str, str]):
raw: bool = False,
vars: _Section | None = None,
_impl: Any | None = None,
**kwargs: Any,
**kwargs: Any, # passed to the underlying parser's get() method
) -> str | _T: ...
# These are partially-applied version of the methods with the same names in
# RawConfigParser; the stubs should be kept updated together