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

Method _from_c

pygit2/submodules.py:52–58  ·  view source on GitHub ↗
(cls, repo: BaseRepository, cptr: 'GitSubmoduleC')

Source from the content-addressed store, hash-verified

50
51 @classmethod
52 def _from_c(cls, repo: BaseRepository, cptr: 'GitSubmoduleC') -> 'Submodule':
53 subm = cls.__new__(cls)
54
55 subm._repo = repo
56 subm._subm = cptr
57
58 return subm
59
60 def __del__(self) -> None:
61 C.git_submodule_free(self._subm)

Callers 3

openMethod · 0.45
__getitem__Method · 0.45
addMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected