diff options
author | Dominic <yobmod@gmail.com> | 2021-08-03 17:03:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-03 17:03:41 +0100 |
commit | 0b89bfe855f0faadf359efcfad8ae752d98c6032 (patch) | |
tree | f165502618cf7d76b652375c1d87b88032d58e6b /git/config.py | |
parent | fe54118ec07a68d5dc6f6108510cffc55dfca643 (diff) | |
download | gitpython-0b89bfe855f0faadf359efcfad8ae752d98c6032.tar.gz |
Add overload to get_value()
Diffstat (limited to 'git/config.py')
-rw-r--r-- | git/config.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/git/config.py b/git/config.py index 293281d2..08e9a8e4 100644 --- a/git/config.py +++ b/git/config.py @@ -710,14 +710,13 @@ class GitConfigParser(cp.RawConfigParser, metaclass=MetaParserBuilder): return self._read_only @overload - def get_value(self, section: str, option: str, default: str - ) -> str: - ... + def get_value(self, section: str, option: str, default: None = None) -> str: ... @overload - def get_value(self, section: str, option: str, default: float - ) -> float: - ... + def get_value(self, section: str, option: str, default: str) -> str: ... + + @overload + def get_value(self, section: str, option: str, default: float) -> float: ... def get_value(self, section: str, option: str, default: Union[int, float, str, bool, None] = None ) -> Union[int, float, str, bool]: |