.. _jgdv.structs.strang.code_ref: ============================ jgdv.structs.strang.code_ref ============================ .. py:module:: jgdv.structs.strang.code_ref Type Aliases ------------ .. autoapisummary:: jgdv.structs.strang.code_ref.CheckType Classes ------- .. autoapisummary:: jgdv.structs.strang.code_ref.CodeReference Module Contents =============== .. py:data:: CheckType :type: TypeAlias :value: type | types.UnionType .. _jgdv.structs.strang.code_ref.CodeReference: .. py:class:: CodeReference(*args, value = None, check = None, **kwargs) Bases: :py:obj:`jgdv.structs.strang.strang.Strang` A reference to a class or function. can be created from a string (so can be used from toml), or from the actual object (from in python) Has the form:: [cls::]module.a.b.c:ClassName Can be built with an imported value directly, and a type to check against __call__ imports the reference .. py:method:: _check_imported_type(check = None) -> .. py:method:: _do_import(*, check = None) -> .. py:method:: _does_imports() -> .. py:method:: _pre_process_h(input, *args, strict = False, **kwargs) -> :classmethod: .. py:method:: expects_type(*args) -> .. py:method:: to_alias(group, plugins) -> TODO Given a nested dict-like, see if this reference can be reduced to an alias .. py:method:: to_uniq(*args) -> :abstractmethod: Generate a concrete instance of this name with a UUID prepended, ie: a.task.group::task.name..{prefix?}.$gen$. .. py:attribute:: _check :type: jgdv.Maybe[CheckType] .. py:attribute:: _formatter :type: ClassVar .. py:attribute:: _processor :type: ClassVar .. py:attribute:: _sections :type: ClassVar .. py:attribute:: _value :value: None