MCPcopy Index your code
hub / github.com/cloudpipe/cloudpickle / _get_bases

Function _get_bases

cloudpickle/cloudpickle.py:626–637  ·  view source on GitHub ↗
(typ)

Source from the content-addressed store, hash-verified

624
625
626def _get_bases(typ):
627 if "__orig_bases__" in getattr(typ, "__dict__", {}):
628 # For generic types (see PEP 560)
629 # Note that simply checking `hasattr(typ, '__orig_bases__')` is not
630 # correct. Subclasses of a fully-parameterized generic class does not
631 # have `__orig_bases__` defined, but `hasattr(typ, '__orig_bases__')`
632 # will return True because it's defined in the base class.
633 bases_attr = "__orig_bases__"
634 else:
635 # For regular class objects
636 bases_attr = "__bases__"
637 return getattr(typ, bases_attr)
638
639
640def _make_dict_keys(obj, is_ordered=False):

Callers 1

_class_getnewargsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…