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

Method __contains__

pygit2/config.py:130–138  ·  view source on GitHub ↗
(self, key: str | bytes)

Source from the content-addressed store, hash-verified

128 return entry
129
130 def __contains__(self, key: str | bytes) -> bool:
131 err, cstr = self._get(key)
132
133 if err == C.GIT_ENOTFOUND:
134 return False
135
136 check_error(err)
137
138 return True
139
140 def __getitem__(self, key: str | bytes) -> str | None:
141 """

Callers

nothing calls this directly

Calls 2

_getMethod · 0.95
check_errorFunction · 0.85

Tested by

no test coverage detected