Merge branch 'addtypes' · gitpython-developers/GitPython@2448ac4 · GitHub
Skip to content

Commit 2448ac4

Browse files
committed
Merge branch 'addtypes'
2 parents 96f8f17 + 37cef23 commit 2448ac4

8 files changed

Lines changed: 83 additions & 74 deletions

File tree

Lines changed: 4 additions & 3 deletions

git/compat/typing.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

git/config.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,23 @@
2222
with_metaclass,
2323
is_win,
2424
)
25-
from git.compat.typing import Literal
25+
2626
from git.util import LockFile
2727

2828
import os.path as osp
2929

3030
import configparser as cp
3131

32+
# typing-------------------------------------------------------
33+
34+
from typing import TYPE_CHECKING, Tuple
35+
36+
from git.types import Literal
37+
38+
if TYPE_CHECKING:
39+
pass
40+
41+
# -------------------------------------------------------------
3242

3343
__all__ = ('GitConfigParser', 'SectionConstraint')
3444

@@ -38,7 +48,8 @@
3848

3949
# invariants
4050
# represents the configuration level of a configuration file
41-
CONFIG_LEVELS = ("system", "user", "global", "repository")
51+
CONFIG_LEVELS = ("system", "user", "global", "repository"
52+
) # type: Tuple[Literal['system'], Literal['user'], Literal['global'], Literal['repository']]
4253

4354
# Section pattern to detect conditional includes.
4455
# https://git-scm.com/docs/git-config#_conditional_includes

git/diff.py

Lines changed: 1 addition & 2 deletions

0 commit comments

Comments
 (0)