yera.ui.updates.state
Persisted state for privacy-preserving UI update checks.
Symbols
load_update_state
load_update_state(
path: Path | None = None,
) → UpdateCheckState | NoneLoad previously persisted update-check state.
Parameters
Explicit state path, or None to use the standard Yera path.
Returns
Validated update state, or None when the file is absent, unreadable, or invalid.
save_update_state
save_update_state(
state: UpdateCheckState,
path: Path | None = None,
) → NonePersist update-check state beneath the Yera home directory.
Parameters
Validated state to persist.
Explicit state path, or None to use the standard Yera path.
update_check_due
update_check_due(
state: UpdateCheckState | None,
now: datetime,
) → boolDetermine whether the twenty-four-hour check interval has elapsed.
Parameters
Previously persisted state, if available.
Current timezone-aware time.
Returns
Whether another release metadata request should be made.
update_state_path
update_state_path() → PathReturn the default path for persisted UI update-check state.
Returns
State-file path beneath Yera's configured home directory.
UpdateCheckState
BaseModelPersisted result of the most recent release update check.