summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
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