MCPcopy Create free account
hub / github.com/alibaba/GraphScope / remove_and_write

Method remove_and_write

python/graphscope/gsctl/config.py:156–166  ·  view source on GitHub ↗
(self, current_context: Context)

Source from the content-addressed store, hash-verified

154 )
155
156 def remove_and_write(self, current_context: Context):
157 # remove
158 del self._contexts[current_context.name]
159 self._current_context = None
160
161 # write
162 contexts = [v.to_dict() for _, v in self._contexts.items()]
163 write_yaml_file(
164 {"contexts": contexts, "current-context": self._current_context},
165 GS_CONFIG_DEFAULT_LOCATION,
166 )
167
168
169class GSConfigLoader(object):

Callers 1

disconnect_coordinatorFunction · 0.80

Calls 3

write_yaml_fileFunction · 0.90
itemsMethod · 0.80
to_dictMethod · 0.45

Tested by

no test coverage detected