yera.runtime.blocks.spinner
Spinner block implementation.
Symbols
SpinnerStream
Inherits:
_StreamHandleStream handle for creating multiple chunks of the same spinner block.
Methods
SpinnerStream.__enter__
__enter__()SpinnerStream.__exit__
__exit__(
exc_type: type[BaseException],
exc_value: BaseException | None,
traceback: TracebackType,
)SpinnerStream.update
update(
message: str | None = None,
glyph: str | None = None,
colour: NamedColour | None = None,
) → NoneUpdate any supplied part of the spinner's active state.
Parameters
message
type: str | None = None
Replacement message, or None to retain the current one.
glyph
type: str | None = None
Replacement glyph, or None to retain the current one.
colour
type: NamedColour | None = None
Replacement colour, or None to retain the current one.
SpinnerStream.fail
fail(
message: str = 'Failed',
) → NoneResolve the spinner with a failed terminal appearance.
Calling this method does not raise an exception or end the surrounding block immediately. The failed state is emitted when the spinner context exits, allowing callers to handle expected failures without exception-based control flow.
Parameters
message
type: str = 'Failed'
Message shown in the failed terminal state.