Skip to content

Commit bfcd3a5

Browse files
author
Martin Vrachev
committed
Simplifications on hashed_bin_delegatio example
We no longer need or use SPEC_VERSION variable defined in the begging of the script. Additionally, I decided to add a small addition to the "roles" type annotation as that gives better context to the syntax highlighter of VS code. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
1 parent e07fa27 commit bfcd3a5

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

examples/repo_example/hashed_bin_delegation.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from securesystemslib.signer import SSlibSigner
2727

2828
from tuf.api.metadata import (
29-
SPECIFICATION_VERSION,
3029
DelegatedRole,
3130
Delegations,
3231
Key,
@@ -42,8 +41,7 @@ def _in(days: float) -> datetime:
4241
return datetime.utcnow().replace(microsecond=0) + timedelta(days=days)
4342

4443

45-
SPEC_VERSION = ".".join(SPECIFICATION_VERSION)
46-
roles: Dict[str, Metadata] = {}
44+
roles: Dict[str, Metadata[Targets]] = {}
4745
keys: Dict[str, Dict[str, Any]] = {}
4846

4947
# Hash bin delegation

0 commit comments

Comments
 (0)