mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-08 22:36:18 +08:00
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.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user