summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorDominic <yobmod@gmail.com>2021-08-03 17:03:41 +0100
committerGitHub <noreply@github.com>2021-08-03 17:03:41 +0100
commit0b89bfe855f0faadf359efcfad8ae752d98c6032 (patch)
treef165502618cf7d76b652375c1d87b88032d58e6b /git/config.py
parentfe54118ec07a68d5dc6f6108510cffc55dfca643 (diff)
downloadgitpython-0b89bfe855f0faadf359efcfad8ae752d98c6032.tar.gz
Add overload to get_value()
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py11
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]: