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

1# /////////////////////////////////////////////////////////////// 

2# _TUF_STATUS - Snapshot of the local TUF tree 

3# Project: ezcompiler 

4# /////////////////////////////////////////////////////////////// 

5 

6"""Value objects describing the local signed TUF tree.""" 

7 

8from __future__ import annotations 

9 

10# /////////////////////////////////////////////////////////////// 

11# IMPORTS 

12# /////////////////////////////////////////////////////////////// 

13# Standard library imports 

14from dataclasses import dataclass 

15from datetime import datetime 

16from pathlib import Path 

17 

18# /////////////////////////////////////////////////////////////// 

19# CLASSES 

20# /////////////////////////////////////////////////////////////// 

21 

22 

23@dataclass(frozen=True) 

24class TufVersion: 

25 """One application version signed in the tree.""" 

26 

27 version: str 

28 required: bool 

29 has_patch: bool 

30 

31 

32@dataclass(frozen=True) 

33class TufStatus: 

34 """State of the local tree, as clients would see it once published.""" 

35 

36 repo_dir: Path 

37 versions: tuple[TufVersion, ...] 

38 expirations: dict[str, datetime] 

39 withdrawn: tuple[str, ...]