| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,7 +57,11 @@ | |||
| 57 | 57 | ||
| 58 | 58 | if TYPE_CHECKING: | |
| 59 | 59 | from .base import IndexFile | |
| 60 | - from git.objects.fun import EntryTup | ||
| 60 | + from git.objects.fun import EntryTupOrNone | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + def is_three_entry_list(inp) -> TypeGuard[List['EntryTupOrNone']]: | ||
| 64 | + return isinstance(inp, list) and len(inp) == 3 | ||
| 61 | 65 | ||
| 62 | 66 | # ------------------------------------------------------------------------------------ | |
| 63 | 67 | ||
@@ -334,11 +338,6 @@ def aggressive_tree_merge(odb, tree_shas: Sequence[bytes]) -> List[BaseIndexEntr | |||
| 334 | 338 | if len(tree_shas) > 3: | |
| 335 | 339 | raise ValueError("Cannot handle %i trees at once" % len(tree_shas)) | |
| 336 | 340 | ||
| 337 | - EntryTupOrNone = Union[EntryTup, None] | ||
| 338 | - | ||
| 339 | - def is_three_entry_list(inp) -> TypeGuard[List[EntryTupOrNone]]: | ||
| 340 | - return isinstance(inp, list) and len(inp) == 3 | ||
| 341 | - | ||
| 342 | 341 | # three trees | |
| 343 | 342 | for three_entries in traverse_trees_recursive(odb, tree_shas, ''): | |
| 344 | 343 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ | |||
| 16 | 16 | from git import GitCmdObjectDB | |
| 17 | 17 | ||
| 18 | 18 | EntryTup = Tuple[bytes, int, str] # same as TreeCacheTup in tree.py | |
| 19 | - | ||
| 19 | + EntryTupOrNone = Union[EntryTup, None] | ||
| 20 | 20 | ||
| 21 | 21 | # --------------------------------------------------- | |
| 22 | 22 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments