summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-05-12 09:53:42 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2021-05-12 09:53:42 +0800
commit2448ac4ca337665eb22b9dd5ca096ef625a8f52b (patch)
tree9867f5a8b543000e56c70860ad59637d1fb33bbe /git/config.py
parent96f8f17d5d63c0e0c044ac3f56e94a1aa2e45ec3 (diff)
parent37cef2340d3e074a226c0e81eaf000b5b90dfa55 (diff)
downloadgitpython-2448ac4ca337665eb22b9dd5ca096ef625a8f52b.tar.gz
Merge branch 'addtypes'
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/git/config.py b/git/config.py
index 0c8d975d..ea7302f4 100644
--- a/git/config.py
+++ b/git/config.py
@@ -22,13 +22,23 @@ from git.compat import (
with_metaclass,
is_win,
)
-from git.compat.typing import Literal
+
from git.util import LockFile
import os.path as osp
import configparser as cp
+# typing-------------------------------------------------------
+
+from typing import TYPE_CHECKING, Tuple
+
+from git.types import Literal
+
+if TYPE_CHECKING:
+ pass
+
+# -------------------------------------------------------------
__all__ = ('GitConfigParser', 'SectionConstraint')
@@ -38,7 +48,8 @@ log.addHandler(logging.NullHandler())
# invariants
# represents the configuration level of a configuration file
-CONFIG_LEVELS = ("system", "user", "global", "repository")
+CONFIG_LEVELS = ("system", "user", "global", "repository"
+ ) # type: Tuple[Literal['system'], Literal['user'], Literal['global'], Literal['repository']]
# Section pattern to detect conditional includes.
# https://git-scm.com/docs/git-config#_conditional_includes