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

Method __contains__

pygit2/submodules.py:202–203  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

200 return Submodule._from_c(self._repository, csub[0])
201
202 def __contains__(self, name: str) -> bool:
203 return self.get(name) is not None
204
205 def __iter__(self) -> Iterator[Submodule]:
206 for s in self._repository.listall_submodules():

Callers

nothing calls this directly

Calls 1

getMethod · 0.95

Tested by

no test coverage detected