Skip to content

Commit c58be4c

Browse files
committed
Remove a bit of old commented-out code in git.objects.*
1 parent 4e9a2f2 commit c58be4c

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Diff for: git/objects/tree.py

-4
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@
4848

4949
TraversedTreeTup = Union[Tuple[Union["Tree", None], IndexObjUnion, Tuple["Submodule", "Submodule"]]]
5050

51-
# def is_tree_cache(inp: Tuple[bytes, int, str]) -> TypeGuard[TreeCacheTup]:
52-
# return isinstance(inp[0], bytes) and isinstance(inp[1], int) and isinstance([inp], str)
53-
5451
# --------------------------------------------------------
5552

5653
cmp: Callable[[str, str], int] = lambda a, b: (a > b) - (a < b)
@@ -124,7 +121,6 @@ def add(self, sha: bytes, mode: int, name: str, force: bool = False) -> "TreeMod
124121
index = self._index_by_name(name)
125122

126123
item = (sha, mode, name)
127-
# assert is_tree_cache(item)
128124

129125
if index == -1:
130126
self._cache.append(item)

Diff for: git/objects/util.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
Any,
3737
Callable,
3838
Deque,
39-
# Generic,
4039
Iterator,
4140
NamedTuple,
4241
Sequence,
@@ -49,7 +48,7 @@
4948
overload,
5049
)
5150

52-
from git.types import Has_id_attribute, Literal # , _T
51+
from git.types import Has_id_attribute, Literal
5352

5453
if TYPE_CHECKING:
5554
from io import BytesIO, StringIO
@@ -63,7 +62,6 @@
6362
from .tag import TagObject
6463
from .tree import TraversedTreeTup, Tree
6564
else:
66-
# Protocol = Generic[_T] # Needed for typing bug #572?
6765
Protocol = ABC
6866

6967
def runtime_checkable(f):

0 commit comments

Comments
 (0)