Set a value in context (for compatibility with dict-based code).
(self, key: str, value: Any)
| 148 | return self._extra.get(key, default) |
| 149 | |
| 150 | def set(self, key: str, value: Any) -> None: |
| 151 | """ |
| 152 | Set a value in context (for compatibility with dict-based code). |
| 153 | """ |
| 154 | if hasattr(self, key): |
| 155 | setattr(self, key, value) |
| 156 | else: |
| 157 | self._extra[key] = value |
| 158 | |
| 159 | def to_dict(self) -> dict[str, Any]: |
| 160 | """ |
no outgoing calls