diff options
author | yobmod <yobmod@gmail.com> | 2021-05-03 15:59:07 +0100 |
---|---|---|
committer | yobmod <yobmod@gmail.com> | 2021-05-03 15:59:07 +0100 |
commit | 6752fad0e93d1d2747f56be30a52fea212bd15d6 (patch) | |
tree | a0618d53d06f35d7326fcacdcaf1832d7ab55b8c /git/config.py | |
parent | 2fd9f6ee5c8b4ae4e01a40dc398e2768d838210d (diff) | |
download | gitpython-6752fad0e93d1d2747f56be30a52fea212bd15d6.tar.gz |
add initial types to remote.py
Diffstat (limited to 'git/config.py')
-rw-r--r-- | git/config.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/git/config.py b/git/config.py index ffbbfab4..0c8d975d 100644 --- a/git/config.py +++ b/git/config.py @@ -16,14 +16,13 @@ import re import fnmatch from collections import OrderedDict -from typing_extensions import Literal - from git.compat import ( defenc, force_text, with_metaclass, is_win, ) +from git.compat.typing import Literal from git.util import LockFile import os.path as osp @@ -196,7 +195,7 @@ class _OMD(OrderedDict): return [(k, self.getall(k)) for k in self] -def get_config_path(config_level: Literal['system','global','user','repository']) -> str: +def get_config_path(config_level: Literal['system', 'global', 'user', 'repository']) -> str: # we do not support an absolute path of the gitconfig on windows , # use the global config instead @@ -216,7 +215,7 @@ def get_config_path(config_level: Literal['system','global','user','repository'] raise ValueError("Invalid configuration level: %r" % config_level) -class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)): +class GitConfigParser(with_metaclass(MetaParserBuilder, cp.RawConfigParser, object)): # type: ignore ## mypy does not understand dynamic class creation # noqa: E501 """Implements specifics required to read git style configuration files. |