From 5232c89de10872a6df6227c5dcea169bd1aa6550 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Tue, 16 Mar 2021 22:08:20 +0000 Subject: add types to git.__init__, compat, db, diff, exc, util --- git/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git/config.py') 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 -- cgit v1.2.1