summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-08-08 21:42:34 +0100
committerYobmod <yobmod@gmail.com>2021-08-08 21:42:34 +0100
commit38f5157253beb5801be80812e9b013a3cdd0bdc9 (patch)
treee75c305577966395857d15ff081beb9afe037828 /git/config.py
parent9d844a624b1cf207f0c379dc64f9b4767d89877d (diff)
downloadgitpython-38f5157253beb5801be80812e9b013a3cdd0bdc9.tar.gz
add type check to conf_encoding (in thoery could be bool or int)
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/git/config.py b/git/config.py
index cf32d4ba..cbd66022 100644
--- a/git/config.py
+++ b/git/config.py
@@ -31,7 +31,7 @@ import configparser as cp
# typing-------------------------------------------------------
from typing import (Any, Callable, Generic, IO, List, Dict, Sequence,
- TYPE_CHECKING, Tuple, TypeVar, Union, cast, overload)
+ TYPE_CHECKING, Tuple, TypeVar, Union, cast)
from git.types import Lit_config_levels, ConfigLevels_Tup, PathLike, assert_never, _T
@@ -709,15 +709,6 @@ class GitConfigParser(cp.RawConfigParser, metaclass=MetaParserBuilder):
""":return: True if this instance may change the configuration file"""
return self._read_only
- @overload
- def get_value(self, section: str, option: str, default: None = None) -> Union[int, float, str, bool]: ...
-
- @overload
- 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]:
# can default or return type include bool?