From 38f5157253beb5801be80812e9b013a3cdd0bdc9 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Sun, 8 Aug 2021 21:42:34 +0100 Subject: add type check to conf_encoding (in thoery could be bool or int) --- git/config.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'git/config.py') 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? -- cgit v1.2.1