Commit Diff


commit - bdd3507b6b8947d2a6a94fa52b5d1a58e4b75788
commit + fe61d0eba8abbe99778fc60f76538f880098b3a2
blob - 43a1b7240ed48010287237a738419e1123ce6378
blob + 435565fbe3796931c52644f31208f03a57ee4c69
--- dulwich/pack.py
+++ dulwich/pack.py
@@ -2395,7 +2395,7 @@ class Pack:
         type_num, chunks = self.resolve_object(offset, obj_type, obj)
         return type_num, b"".join(chunks)
 
-    def __getitem__(self, sha1: bytes) -> bytes:
+    def __getitem__(self, sha1: bytes) -> ShaFile:
         """Retrieve the specified SHA1."""
         type, uncomp = self.get_raw(sha1)
         return ShaFile.from_raw_string(type, uncomp, sha=sha1)