Coverage for src/ezcompiler/shared/_tuf_status.py: 100.00%
15 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-16 16:37 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-16 16:37 +0000
1# ///////////////////////////////////////////////////////////////
2# _TUF_STATUS - Snapshot of the local TUF tree
3# Project: ezcompiler
4# ///////////////////////////////////////////////////////////////
6"""Value objects describing the local signed TUF tree."""
8from __future__ import annotations
10# ///////////////////////////////////////////////////////////////
11# IMPORTS
12# ///////////////////////////////////////////////////////////////
13# Standard library imports
14from dataclasses import dataclass
15from datetime import datetime
16from pathlib import Path
18# ///////////////////////////////////////////////////////////////
19# CLASSES
20# ///////////////////////////////////////////////////////////////
23@dataclass(frozen=True)
24class TufVersion:
25 """One application version signed in the tree."""
27 version: str
28 required: bool
29 has_patch: bool
32@dataclass(frozen=True)
33class TufStatus:
34 """State of the local tree, as clients would see it once published."""
36 repo_dir: Path
37 versions: tuple[TufVersion, ...]
38 expirations: dict[str, datetime]
39 withdrawn: tuple[str, ...]