Skip to content

Commit 5d5f9a9

Browse files
jason-raitzawilfox
andauthored
Apply suggestions from code review
Co-authored-by: Anna Wilcox <AWilcox@Wilcox-Tech.com>
1 parent 4ce7ca2 commit 5d5f9a9

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tind_client/client.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,16 @@ def fetch_metadata(self, record: str) -> Record:
7373
return records[0]
7474

7575
def fetch_file(self, file_url: str, output_dir: str = "", modified: str = "") -> str:
76-
"""Download a file from TIND and save it locally. If the file already exists in the output
77-
directory and has a local modified timestamp that is newer than supplied ``modified``
76+
"""Download a file from TIND and save it locally.
77+
78+
If the file already exists in the output directory and was modified at or after a supplied ``modified``
7879
timestamp, the file will not be re-downloaded.
7980
8081
:param str file_url: The TIND file download URL.
8182
:param str output_dir: Directory in which to save the file.
8283
Falls back to ``default_storage_dir`` when empty.
83-
:param str modified: Optional modified timestamp from the file metadata returned by TIND
84+
:param str modified: Optional modified timestamp from the file metadata returned by TIND.
85+
If not specified, the file will always be downloaded.
8486
:raises AuthorizationError: When the TIND API key is invalid or the file is restricted.
8587
:raises ValueError: When ``file_url`` is not a valid TIND file download URL.
8688
:raises RecordNotFoundError: When the file is invalid or not found.

0 commit comments

Comments
 (0)