From 78d12aa7c922551dddd7168498e29eae32c9d109 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Sun, 16 May 2021 18:04:30 +0100 Subject: Add remaining types to IndexFile ._preprocess_add_items() to .diff() --- git/index/typ.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'git/index/typ.py') diff --git a/git/index/typ.py b/git/index/typ.py index 2a7dd799..4d307777 100644 --- a/git/index/typ.py +++ b/git/index/typ.py @@ -8,6 +8,8 @@ from .util import ( ) from git.objects import Blob +from git.types import PathLike + __all__ = ('BlobFilter', 'BaseIndexEntry', 'IndexEntry') @@ -79,7 +81,7 @@ class BaseIndexEntry(tuple): return b2a_hex(self[1]).decode('ascii') @property - def stage(self): + def stage(self) -> int: """Stage of the entry, either: * 0 = default stage @@ -92,7 +94,7 @@ class BaseIndexEntry(tuple): return (self[2] & CE_STAGEMASK) >> CE_STAGESHIFT @property - def path(self): + def path(self) -> PathLike: """:return: our path relative to the repository working tree root""" return self[3] -- cgit v1.2.1