mordred/_base/__init__.py
def _Descriptor_from_json(self, obj):
    """Create Descriptor instance from json dict.

    Parameters:
        obj(dict): descriptor dict

    Returns:
        Descriptor: descriptor

    """
    descs = getattr(self, "_all_descriptors", None)

    if descs is None:
        from mordred import descriptors
        descs = {
            cls.__name__: cls
            for cls in get_descriptors_in_module(descriptors)
        }
        descs[ConstDescriptor.__name__] = ConstDescriptor
        self._all_descriptors = descs

    return _from_json(obj, descs)
def _Descriptor_from_json(self, obj):
    descs = getattr(self, "_all_descriptors", None)

    if descs is None:
        from mordred import descriptors
        descs = {
            cls.__name__: cls
            for cls in get_descriptors_in_module(descriptors)
        }
        descs[ConstDescriptor.__name__] = ConstDescriptor
        self._all_descriptors = descs

    return _from_json(obj, descs)
def _Descriptor_from_json ( self , obj ) : descs = getattr ( self , "_all_descriptors" , None ) if descs is None : from mordred import descriptors descs = { cls . __name__ : cls for cls in get_descriptors_in_module ( descriptors ) } descs [ ConstDescriptor . __name__ ] = ConstDescriptor self . _all_descriptors = descs return _from_json ( obj , descs )
Create Descriptor instance from json dict.

    Parameters:
        obj(dict): descriptor dict

    Returns:
        Descriptor: descriptor
Create Descriptor instance from json dict .