Skip to content

Commit c2a0321

Browse files
committed
fix: ⏪️ Revert addition of dunder new method.
1 parent a3a733b commit c2a0321

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

changes/346.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reverted addition of dunder new method to Adapter class as it's still causing problems and we should handle in SSoT.

diffsync/__init__.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -482,19 +482,6 @@ def __init_subclass__(cls) -> None:
482482
if not isclass(value) or not issubclass(value, DiffSyncModel):
483483
raise AttributeError(f'top_level references attribute "{name}" but it is not a DiffSyncModel subclass!')
484484

485-
def __new__(cls, **kwargs): # type: ignore[no-untyped-def]
486-
"""Document keyword arguments that were used to initialize Adapter."""
487-
meta_kwargs = {}
488-
for key, value in kwargs.items():
489-
try:
490-
meta_kwargs[key] = deepcopy(value)
491-
except Exception: # pylint: disable=broad-exception-caught
492-
# Some objects (e.g. Kafka Consumer, DB connections) cannot be deep copied
493-
meta_kwargs[key] = value
494-
instance = super().__new__(cls)
495-
instance._meta_kwargs = meta_kwargs
496-
return instance
497-
498485
def __str__(self) -> StrType:
499486
"""String representation of an Adapter."""
500487
if self.type != self.name:

0 commit comments

Comments
 (0)