MCPcopy Create free account
hub / github.com/libgit2/pygit2 / __getitem__

Method __getitem__

pygit2/blame.py:133–138  ·  view source on GitHub ↗
(self, index: int)

Source from the content-addressed store, hash-verified

131 return C.git_blame_get_hunk_count(self._blame)
132
133 def __getitem__(self, index: int) -> BlameHunk:
134 chunk = C.git_blame_get_hunk_byindex(self._blame, index)
135 if not chunk:
136 raise IndexError
137
138 return BlameHunk._from_c(self, chunk)
139
140 def for_line(self, line_no: int) -> BlameHunk:
141 """

Calls 1

_from_cMethod · 0.45