Tuple#

class ctapipe.core.traits.Tuple(*, allow_none: Literal[False], read_only: bool | None = ..., help: str | None = ..., config: Any | None = ..., **kwargs: Any)#
class ctapipe.core.traits.Tuple(*, allow_none: Literal[True], read_only: bool | None = ..., help: str | None = ..., config: Any | None = ..., **kwargs: Any)
class ctapipe.core.traits.Tuple(*, trait: Any = ..., default_value: Any = ..., help: str = ..., read_only: bool = ..., config: Any = ..., **kwargs: Any)

Bases: Container[Tuple[Any, …]]

An instance of a Python tuple.

Methods Summary

class_init(cls, name)

Part of the initialization which may depend on the underlying HasDescriptors class.

item_from_string(s, index)

Cast a single item from a string

subclass_init(cls)

validate_elements(obj, value)

Methods Documentation

class_init(cls: type[Any], name: str | None) None[source]#

Part of the initialization which may depend on the underlying HasDescriptors class.

It is typically overloaded for specific types.

This method is called by MetaHasDescriptors.__init__() passing the class (cls) and name under which the descriptor has been assigned.

item_from_string(s: str, index: int) Any[source]#

Cast a single item from a string

Evaluated when parsing CLI configuration from a string

subclass_init(cls: type[Any]) None[source]#
validate_elements(obj: Any, value: Any) Any[source]#