Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc58be4c

Browse files
committed
Remove a bit of old commented-out code in git.objects.*
1 parent4e9a2f2 commitc58be4c

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

‎git/objects/tree.py

Lines changed: 0 additions & 4 deletions
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]=lambdaa,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
ifindex==-1:
130126
self._cache.append(item)

‎git/objects/util.py

Lines changed: 1 addition & 3 deletions
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-
fromgit.typesimportHas_id_attribute,Literal# , _T
51+
fromgit.typesimportHas_id_attribute,Literal
5352

5453
ifTYPE_CHECKING:
5554
fromioimportBytesIO,StringIO
@@ -63,7 +62,6 @@
6362
from .tagimportTagObject
6463
from .treeimportTraversedTreeTup,Tree
6564
else:
66-
# Protocol = Generic[_T] # Needed for typing bug #572?
6765
Protocol=ABC
6866

6967
defruntime_checkable(f):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp