summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authoryobmod <yobmod@gmail.com>2021-05-08 18:31:38 +0100
committeryobmod <yobmod@gmail.com>2021-05-08 18:31:38 +0100
commit37cef2340d3e074a226c0e81eaf000b5b90dfa55 (patch)
tree9867f5a8b543000e56c70860ad59637d1fb33bbe /git/config.py
parent6a2f5d05f4a8e3427d6dd2a5981f148a9f6bef84 (diff)
downloadgitpython-37cef2340d3e074a226c0e81eaf000b5b90dfa55.tar.gz
flake8 fixes
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