MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / _pull_attributes

Method _pull_attributes

masfactory/core/node.py:87–97  ·  view source on GitHub ↗

Pull local attributes from `outer_env` according to `pull_keys`.

(self, outer_env:dict[str,object]|None)

Source from the content-addressed store, hash-verified

85 self._default_attributes = {**key_gen_env,**attributes}
86 self._attributes_store = self._default_attributes.copy()
87 def _pull_attributes(self, outer_env:dict[str,object]|None):
88 """Pull local attributes from `outer_env` according to `pull_keys`."""
89 if outer_env:
90 if self._pull_keys is None:
91 self._attributes_store = {**self._attributes_store,**outer_env.copy()}
92 elif len(self._pull_keys) > 0:
93 self._update_env(self._attributes_store, outer_env, self._pull_keys)
94 elif len(self._pull_keys) == 0:
95 pass
96 else:
97 raise ValueError("pull_keys encountered an unexpected error")
98
99 def _attributes_push_local(self, update_env:dict[str,object]|None):
100 """Push output fields to local attributes according to `push_keys`."""

Callers 2

executeMethod · 0.95
executeMethod · 0.80

Calls 1

_update_envMethod · 0.95

Tested by

no test coverage detected