From e6345d60a7926bd413d3d7238ba06f7c81a7faf9 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Sat, 24 Jul 2021 17:10:32 +0100 Subject: Replace all Typeguard with cast, revert update to typing-extensions==3.10.0 --- git/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git/config.py') diff --git a/git/config.py b/git/config.py index 345cb40e..b25707b2 100644 --- a/git/config.py +++ b/git/config.py @@ -34,7 +34,7 @@ import configparser as cp from typing import (Any, Callable, IO, List, Dict, Sequence, TYPE_CHECKING, Tuple, Union, cast, overload) -from git.types import Lit_config_levels, ConfigLevels_Tup, PathLike, TBD, assert_never, is_config_level +from git.types import Lit_config_levels, ConfigLevels_Tup, PathLike, TBD, assert_never if TYPE_CHECKING: from git.repo.base import Repo @@ -309,9 +309,9 @@ class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser)): # else: if config_level is None: if read_only: - self._file_or_files = [get_config_path(f) + self._file_or_files = [get_config_path(cast(Lit_config_levels, f)) for f in CONFIG_LEVELS - if is_config_level(f) and f != 'repository'] + if f != 'repository'] else: raise ValueError("No configuration level or configuration files specified") else: -- cgit v1.2.1