diff options
| author | 2024-03-17 20:08:20 +0800 | |
|---|---|---|
| committer | 2024-03-17 20:08:20 +0800 | |
| commit | b670e7b74ad2b17925acc4d0ebaf0349946e5bde (patch) | |
| tree | 6a9eb7d7ec577d9225611a0199df56f182af02e5 | |
| parent | 35f58ca13a0edbbbf5d6382ca5e2b3d3c7c01509 (diff) | |
| download | infini-b670e7b74ad2b17925acc4d0ebaf0349946e5bde.tar.gz infini-b670e7b74ad2b17925acc4d0ebaf0349946e5bde.zip | |
feat(doc): add update method
| -rw-r--r-- | src/infini/doc.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/infini/doc.py b/src/infini/doc.py index 9913309b..0b67e54c 100644 --- a/src/infini/doc.py +++ b/src/infini/doc.py @@ -25,6 +25,13 @@ class Doc: self.global_variables = {} self.interceptors = {} + def update(self, __object: "Doc") -> None: + self.pre_interceptors.update(__object.pre_interceptors) + self.handlers.update(__object.handlers) + self.events.update(__object.events) + self.global_variables.update(__object.global_variables) + self.interceptors.update(__object.interceptors) + def dumps(self) -> str: return json.dumps( { |
