MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / _class_getnewargs

Function _class_getnewargs

cloudpickle/cloudpickle.py:672–688  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

670
671
672def _class_getnewargs(obj):
673 type_kwargs = {}
674 if "__module__" in obj.__dict__:
675 type_kwargs["__module__"] = obj.__module__
676
677 __dict__ = obj.__dict__.get("__dict__", None)
678 if isinstance(__dict__, property):
679 type_kwargs["__dict__"] = __dict__
680
681 return (
682 type(obj),
683 obj.__name__,
684 _get_bases(obj),
685 type_kwargs,
686 _get_or_create_tracker_id(obj),
687 None,
688 )
689
690
691def _enum_getnewargs(obj):

Callers 1

_dynamic_class_reduceFunction · 0.85

Calls 2

_get_basesFunction · 0.85

Tested by

no test coverage detected