Push output fields to outer attributes according to `push_keys`.
(self,outer_env:dict[str,object]|None, update_env:dict[str,object]|None)
| 112 | raise ValueError("push_keys encountered an unexpected error") |
| 113 | |
| 114 | def _attributes_push_outer(self,outer_env:dict[str,object]|None, update_env:dict[str,object]|None): |
| 115 | """Push output fields to outer attributes according to `push_keys`.""" |
| 116 | if update_env is not None and outer_env is not None: |
| 117 | if self._push_keys is None: |
| 118 | if self._pull_keys is not None: |
| 119 | self._update_env(outer_env, update_env, self._pull_keys) |
| 120 | else: |
| 121 | self._update_env(outer_env, update_env, None) |
| 122 | elif len(self._push_keys) == 0: |
| 123 | pass |
| 124 | elif len(self._push_keys) > 0: |
| 125 | self._update_env(outer_env, update_env, self._push_keys) |
| 126 | else: |
| 127 | raise ValueError("push_keys encountered an unexpected error") |
| 128 | |
| 129 | def _update_env(self, updated_env:dict[str,object], update_env:dict[str,object], update_keys:dict[str,str]|None): |
| 130 | """Update selected keys from `update_env` into `updated_env`.""" |
no test coverage detected