diff options
| author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-07-25 10:22:22 +0800 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-25 10:22:22 +0800 | 
| commit | c5e6ae25b9169e5ef070d791fb9d620e2357e24e (patch) | |
| tree | 680964b9eb8cc102cd1e79f8aeadde6620fc0eb6 /git/repo/base.py | |
| parent | 0c1446da2d1ce0382cbc65d7a2aad4483783ae74 (diff) | |
| parent | be7bb868279f61d55594059690904baabe30503c (diff) | |
| download | gitpython-c5e6ae25b9169e5ef070d791fb9d620e2357e24e.tar.gz | |
Merge pull request #1298 from Yobmod/main
Revert use of Typeguard and therefore typing-extensions==3.10.0.0
Diffstat (limited to 'git/repo/base.py')
| -rw-r--r-- | git/repo/base.py | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 64f32bd3..a57172c6 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -36,7 +36,7 @@ import gitdb  # typing ------------------------------------------------------ -from git.types import TBD, PathLike, Lit_config_levels, Commit_ish, Tree_ish, is_config_level +from git.types import TBD, PathLike, Lit_config_levels, Commit_ish, Tree_ish  from typing import (Any, BinaryIO, Callable, Dict,                      Iterator, List, Mapping, Optional, Sequence,                      TextIO, Tuple, Type, Union, @@ -482,7 +482,8 @@ class Repo(object):          raise ValueError("Invalid configuration level: %r" % config_level) -    def config_reader(self, config_level: Optional[Lit_config_levels] = None) -> GitConfigParser: +    def config_reader(self, config_level: Optional[Lit_config_levels] = None +                      ) -> GitConfigParser:          """          :return:              GitConfigParser allowing to read the full git configuration, but not to write it @@ -498,12 +499,14 @@ class Repo(object):              unknown, instead the global path will be used."""          files = None          if config_level is None: -            files = [self._get_config_path(f) for f in self.config_level if is_config_level(f)] +            files = [self._get_config_path(cast(Lit_config_levels, f)) +                     for f in self.config_level if cast(Lit_config_levels, f)]          else:              files = [self._get_config_path(config_level)]          return GitConfigParser(files, read_only=True, repo=self) -    def config_writer(self, config_level: Lit_config_levels = "repository") -> GitConfigParser: +    def config_writer(self, config_level: Lit_config_levels = "repository" +                      ) -> GitConfigParser:          """          :return:              GitConfigParser allowing to write values of the specified configuration file level.  | 
