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

Method get

pygit2/submodules.py:209–217  ·  view source on GitHub ↗

Look up submodule information by name or path. Unlike __getitem__, this returns None if the submodule is not found.

(self, name: str)

Source from the content-addressed store, hash-verified

207 yield self[s]
208
209 def get(self, name: str) -> Submodule | None:
210 """
211 Look up submodule information by name or path.
212 Unlike __getitem__, this returns None if the submodule is not found.
213 """
214 try:
215 return self[name]
216 except KeyError:
217 return None
218
219 def add(
220 self,

Callers 1

__contains__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected