.. _doot.control.loaders._interface: =============================== doot.control.loaders._interface =============================== .. py:module:: doot.control.loaders._interface Type Aliases ------------ .. autoapisummary:: doot.control.loaders._interface.Loaders_p doot.control.loaders._interface.PluginLoader_p doot.control.loaders._interface.CommandLoader_p doot.control.loaders._interface.TaskLoader_p Protocols --------- .. autoapisummary:: doot.control.loaders._interface.Loader_p Module Contents =============== .. py:data:: Loaders_p :type: TypeAlias :value: CommandLoader_p | PluginLoader_p | TaskLoader_p .. py:data:: PluginLoader_p :type: TypeAlias :value: Loader_p[EntryPoint] .. py:data:: CommandLoader_p :type: TypeAlias :value: Loader_p[Command_p] .. py:data:: TaskLoader_p :type: TypeAlias :value: Loader_p[SpecStruct_p] .. _doot.control.loaders._interface.Loader_p: .. py:class:: Loader_p Bases: :py:obj:`Protocol` Base class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing). For example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto[T](Protocol): def meth(self) -> T: ... .. py:method:: setup(data: jgdv.structs.chainguard.ChainGuard) -> Self .. py:method:: load() -> jgdv.structs.chainguard.ChainGuard