summaryrefslogtreecommitdiff
path: root/git/diff.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-31 22:26:20 +0100
committerYobmod <yobmod@gmail.com>2021-07-31 22:26:20 +0100
commit39d37d550963a6a64e66ba3d6b9f4b077270a3ad (patch)
tree0f5f7d75ffc4ac1d6abc689d6739d7077adf7d27 /git/diff.py
parent2a350b57ce79a0e1b71623d1146c52918232e074 (diff)
downloadgitpython-39d37d550963a6a64e66ba3d6b9f4b077270a3ad.tar.gz
replace some TBDs wiht runtime types
Diffstat (limited to 'git/diff.py')
-rw-r--r--git/diff.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git/diff.py b/git/diff.py
index 74ca0b64..fc16b73e 100644
--- a/git/diff.py
+++ b/git/diff.py
@@ -16,7 +16,7 @@ from .objects.util import mode_str_to_int
# typing ------------------------------------------------------------------
from typing import Any, Iterator, List, Match, Optional, Tuple, Type, TypeVar, Union, TYPE_CHECKING, cast
-from git.types import PathLike, TBD, Literal
+from git.types import PathLike, Literal
if TYPE_CHECKING:
from .objects.tree import Tree
@@ -24,6 +24,7 @@ if TYPE_CHECKING:
from git.repo.base import Repo
from git.objects.base import IndexObject
from subprocess import Popen
+ from git import Git
Lit_change_type = Literal['A', 'D', 'C', 'M', 'R', 'T', 'U']
@@ -442,7 +443,7 @@ class Diff(object):
return None
@ classmethod
- def _index_from_patch_format(cls, repo: 'Repo', proc: TBD) -> DiffIndex:
+ def _index_from_patch_format(cls, repo: 'Repo', proc: Union['Popen', 'Git.AutoInterrupt']) -> DiffIndex:
"""Create a new DiffIndex from the given text which must be in patch format
:param repo: is the repository we are operating on - it is required
:param stream: result of 'git diff' as a stream (supporting file protocol)