abstract#

@author: ☙ Ryan McConnell ❧

class grave_settings.abstract.Serializable[source]#

Bases: object

classmethod check_in_serialization_context(context)[source]#

This method typically is called on an instantiated object, so it may not be necessary for it to be a class method.

Parameters:

context (FormatterContext) –

classmethod check_in_deserialization_context(context)[source]#

This method is typically called on type objects, so it should remain a class method in sub-classes. This is where you can put a reference to NotifyFinalizedMethodName to get a callback

Parameters:

context (FormatterContext) –

to_dict(context, **kwargs)[source]#
Parameters:

context (FormatterContext) –

Return type:

dict

from_dict(state_obj, context, **kwargs)[source]#
Parameters:
finalize(frame)[source]#
Parameters:

frame (FormatterContext) –

Return type:

None

class grave_settings.abstract.VersionedSerializable[source]#

Bases: Serializable

VERSION = None#
classmethod get_version()[source]#
classmethod get_version_object()[source]#

It is saf to override this as an instance method

classmethod get_conversion_manager()[source]#
Return type:

ConversionManager

classmethod check_convert_update(state_obj, load_type, version_obj)[source]#
Parameters:
Return type:

dict | Literal[False]

classmethod conversion_manager_converted(state_obj, class_str, ver, target_ver=None)[source]#
Parameters:
  • state_obj (dict) –

  • class_str (str) –

  • ver (str) –

  • target_ver (str) –

classmethod get_versioning_endpoint()[source]#
Return type:

Type[Self]

grave_settings.abstract.make_kill_converter(cls)[source]#
Parameters:

cls (Type[VersionedSerializable]) –

Return type:

Callable[[dict], dict]

class grave_settings.abstract.IASettings(*args, initialize_settings=True, **kwargs)[source]#

Bases: VersionedSerializable, MutableMapping

parent: IASettings | None#
init_settings(**kwargs)[source]#
Return type:

None

get_versioning_endpoint()[source]#
Return type:

Type[VersionedSerializable]

invalidate#
update([E, ]**F) None.  Update D from mapping/iterable E and F.[source]#

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

Parameters:
  • mapping_obj (Mapping[_KT, _VT]) –

  • kwargs (_VT) –

finalize(frame)[source]#
Parameters:

frame (FormatterContext) –

abstract generate_key_value_pairs(**kwargs)[source]#
Return type:

Generator[tuple[object, object], None, None]

get_validator()[source]#
Return type:

SettingsValidator | None

file_path#