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

Method __iter__

pygit2/config.py:169–180  ·  view source on GitHub ↗

Iterate over configuration entries, returning a ``ConfigEntry`` objects. These contain the name, level, and value of each configuration variable. Be aware that this may return multiple versions of each entry if they are set multiple times in the configuration files.

(self)

Source from the content-addressed store, hash-verified

167 check_error(err)
168
169 def __iter__(self) -> Iterator['ConfigEntry']:
170 """
171 Iterate over configuration entries, returning a ``ConfigEntry``
172 objects. These contain the name, level, and value of each configuration
173 variable. Be aware that this may return multiple versions of each entry
174 if they are set multiple times in the configuration files.
175 """
176 citer = ffi.new('git_config_iterator **')
177 err = C.git_config_iterator_new(citer, self._config)
178 check_error(err)
179
180 return ConfigIterator(self, citer[0])
181
182 def get_multivar(
183 self, name: str | bytes, regex: str | None = None

Callers

nothing calls this directly

Calls 2

check_errorFunction · 0.85
ConfigIteratorClass · 0.85

Tested by

no test coverage detected