Skip to content

Commit

Permalink
Create a separate copy of the base class
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamadkhalaj committed Nov 1, 2023
1 parent dff30e2 commit e241404
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aggify/aggify.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def __init__(self, base_model: Type[Document]):
Args:
base_model: The base model class.
"""
self.base_model = base_model
# Create a separate copy of the main class for safety and flexibility
self.base_model = type(
"Aggify_base_model", base_model.__bases__, dict(base_model.__dict__)
)
self.pipelines: list[dict[str, dict | Any]] = []
self.start = None
self.stop = None
Expand Down

0 comments on commit e241404

Please sign in to comment.