Browse Source

Merge pull request #1207 from jelmer/index-docstring

Clarify that Index.__getitem__ returns a Index or ConflictedIndexEntry
Jelmer Vernooij 1 year ago
parent
commit
ad7414294f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      dulwich/index.py

+ 2 - 2
dulwich/index.py

@@ -455,8 +455,8 @@ class Index:
     def __getitem__(self, key: bytes) -> Union[IndexEntry, ConflictedIndexEntry]:
         """Retrieve entry by relative path and stage.
 
-        Returns: tuple with (ctime, mtime, dev, ino, mode, uid, gid, size, sha,
-            flags)
+        Returns: Either a IndexEntry or a ConflictedIndexEntry
+        Raises KeyError: if the entry does not exist
         """
         return self._byname[key]