MCPcopy
hub / github.com/saltstack/salt / pop

Method pop

salt/utils/oset.py:153–165  ·  view source on GitHub ↗

Remove and return the last element from the set. Raises KeyError if the set is empty.

(self)

Source from the content-addressed store, hash-verified

151 return self.map[key]
152
153 def pop(self):
154 """
155 Remove and return the last element from the set.
156
157 Raises KeyError if the set is empty.
158 """
159 if not self.items:
160 raise KeyError("Set is empty")
161
162 elem = self.items[-1]
163 del self.items[-1]
164 del self.map[elem]
165 return elem
166
167 def discard(self, key): # pylint: disable=arguments-differ,arguments-renamed
168 """

Callers 15

_report_coverageFunction · 0.45
_ci_testFunction · 0.45
decompress_dependenciesFunction · 0.45
compress_dependenciesFunction · 0.45
ci_test_onedir_pkgsFunction · 0.45
sync_os_labelsFunction · 0.45
iterMethod · 0.45
build_path_cacheFunction · 0.45
check_module_indexesFunction · 0.45
_apply_excludeFunction · 0.45
pad_funcsMethod · 0.45
_run_check_functionMethod · 0.45

Calls

no outgoing calls

Tested by 15

pytest_runtest_setupFunction · 0.36
clean_returnMethod · 0.36
_run_salt_cmds_fnFunction · 0.36
queue_limited_mm_minionFunction · 0.36
_run_salt_cmds_fnFunction · 0.36
checkFunction · 0.36
test_wheelFunction · 0.36
test_eggFunction · 0.36