We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c58590d commit 36f35fcCopy full SHA for 36f35fc
diffsync/__init__.py
@@ -16,6 +16,7 @@
16
"""
17
18
import sys
19
+from copy import deepcopy
20
from inspect import isclass
21
from typing import (
22
Any,
@@ -480,6 +481,13 @@ def __init_subclass__(cls) -> None:
480
481
if not isclass(value) or not issubclass(value, DiffSyncModel):
482
raise AttributeError(f'top_level references attribute "{name}" but it is not a DiffSyncModel subclass!')
483
484
+ def __new__(cls, **kwargs):
485
+ """"""
486
+ meta_kwargs = deepcopy(kwargs)
487
+ instance = super().__new__(cls)
488
+ instance._meta_kwargs = meta_kwargs
489
+ return instance
490
+
491
def __str__(self) -> StrType:
492
"""String representation of an Adapter."""
493
if self.type != self.name:
0 commit comments