summaryrefslogtreecommitdiff
path: root/git/config.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-03-17 17:49:09 +0800
committerGitHub <noreply@github.com>2021-03-17 17:49:09 +0800
commit6643a9feb39d4d49c894c1d25e3d4d71e180208a (patch)
tree002c4c12c1da90f1889672942cdb500ad0dce47d /git/config.py
parent690722a611a25a1afcdb0163d3cfd0a8c89d1d04 (diff)
parentc93e971f3e0aa4dea12a0cb169539fe85681e381 (diff)
downloadgitpython-6643a9feb39d4d49c894c1d25e3d4d71e180208a.tar.gz
Merge pull request #1202 from Yobmod/main
Add more types
Diffstat (limited to 'git/config.py')
-rw-r--r--git/config.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/git/config.py b/git/config.py
index 9f09efe2..aadb0aac 100644
--- a/git/config.py
+++ b/git/config.py
@@ -16,6 +16,8 @@ import re
import fnmatch
from collections import OrderedDict
+from typing_extensions import Literal
+
from git.compat import (
defenc,
force_text,
@@ -194,7 +196,7 @@ class _OMD(OrderedDict):
return [(k, self.getall(k)) for k in self]
-def get_config_path(config_level):
+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