Skip to content

Commit 1b404f3

Browse files
author
Jussi Kukkonen
committed
ngclient Updater: Fix annotations/docstrings
* updated_targets() both takes and returns a list * download_target() argument can come from either updated_targets() or get_one_valid_targetinfo() Signed-off-by: Jussi Kukkonen <[email protected]>
1 parent 82dcb50 commit 1b404f3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tuf/ngclient/updater.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import fnmatch
88
import logging
99
import os
10-
from typing import Dict, Optional
10+
from typing import Any, Dict, List, Optional
1111
from urllib import parse
1212

1313
from securesystemslib import exceptions as sslib_exceptions
@@ -121,7 +121,9 @@ def get_one_valid_targetinfo(self, target_path: str) -> Dict:
121121
return self._preorder_depth_first_walk(target_path)
122122

123123
@staticmethod
124-
def updated_targets(targets: Dict, destination_directory: str) -> Dict:
124+
def updated_targets(
125+
targets: List[Dict[str, Any]], destination_directory: str
126+
) -> List[Dict[str, Any]]:
125127
"""
126128
After the client has retrieved the target information for those targets
127129
they are interested in updating, they would call this method to
@@ -181,7 +183,8 @@ def download_target(
181183
Download target specified by 'targetinfo' into 'destination_directory'.
182184
183185
Args:
184-
targetinfo: data received from get_one_valid_targetinfo()
186+
targetinfo: data received from get_one_valid_targetinfo() or
187+
updated_targets().
185188
destination_directory: existing local directory to download into.
186189
Note that new directories may be created inside
187190
destination_directory as required.

0 commit comments

Comments
 (0)