formatter_settings#
- class grave_settings.formatter_settings.AddSemantics(val, semantics=None, frame_semantics=None)[source]#
Bases:
object
Wrapping an object in this class will tell the formatter to add semantics to its frame
- Parameters:
val (T) –
semantics (set[grave_settings.semantics.Semantic] | None) –
frame_semantics (set[grave_settings.semantics.Semantic] | None) –
- val#
- semantics#
- frame_semantics#
- class grave_settings.formatter_settings.NoRef(val, semantics=None, frame_semantics=None)[source]#
Bases:
AddSemantics
Wrapping an object in this class will tell the formatter to not reference this object or cache it
- Parameters:
val (T) –
semantics (set[grave_settings.semantics.Semantic] | None) –
frame_semantics (set[grave_settings.semantics.Semantic] | None) –
- class grave_settings.formatter_settings.Temporary(val, semantics=None, frame_semantics=None)[source]#
Bases:
NoRef
Wrapping an object in this class will tell the formatter that the object is not to be referenced and has no strings attached to any other object. The wrapped object exists only for communicating data to the formatter. The formatter may mutate it and destroy it.
- Parameters:
val (T) –
semantics (set[grave_settings.semantics.Semantic] | None) –
frame_semantics (set[grave_settings.semantics.Semantic] | None) –
- class grave_settings.formatter_settings.PreservedReference(obj=None, ref=None)[source]#
Bases:
object
This clas denotes a reference to another path in an object hierarchy. This object should act like a pointer describing where an object exists in the structure.
- Parameters:
obj (None | object) –
- ref#
- obj#
- class grave_settings.formatter_settings.FormatterSpec[source]#
Bases:
object
- ROUTE_PATH_TRANSLATION = {34: '\\"', 46: '\\.', 92: '\\\\'}#
- ROUTE_PATH_REGEX = re.compile('(?:[^\\."]|"(?:\\\\.|[^"])*")+')#
- PRIMITIVES = int | float | str | bool | None#
- SPECIAL = dict | list#
- TYPES = int | float | str | bool | None | dict | list#
- class grave_settings.formatter_settings.FormatterContext(semantics)[source]#
Bases:
object
- Parameters:
semantics (FrameStackContext) –
- property handler: OrderedHandler#
- find(reference)[source]#
- Parameters:
reference (PreservedReference) –
- check_ref(reference)[source]#
- Parameters:
reference (PreservedReference) –