From 928ddce49a847e214f07fd4d31d4be83721daf0f Mon Sep 17 00:00:00 2001 From: Patrick Renner Date: Thu, 9 Jan 2025 10:11:00 -0600 Subject: [PATCH] lint --- .../threatexchange/exchanges/impl/ncmec_api.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/python-threatexchange/threatexchange/exchanges/impl/ncmec_api.py b/python-threatexchange/threatexchange/exchanges/impl/ncmec_api.py index 1cf35eb5d..eedd737f5 100644 --- a/python-threatexchange/threatexchange/exchanges/impl/ncmec_api.py +++ b/python-threatexchange/threatexchange/exchanges/impl/ncmec_api.py @@ -282,7 +282,9 @@ def log(event: str) -> None: updates: t.List[api.NCMECEntryUpdate] = [] for i, entry in enumerate( client.get_entries_iter( - start_timestamp=current_start, end_timestamp=current_end, next_=current_next_fetch, + start_timestamp=current_start, + end_timestamp=current_end, + next_=current_next_fetch, ) ): if i == 0: # First batch, check for overfetch @@ -315,8 +317,11 @@ def log(event: str) -> None: log(f"large fetch ({i}), up to {len(updates)}. storing checkpoint") yield state.FetchDelta( {f"{entry.member_id}-{entry.id}": entry for entry in updates}, - NCMECCheckpoint(get_entries_max_ts=current_start, next_fetch=entry.next, last_fetch_time=int(time.time())), - + NCMECCheckpoint( + get_entries_max_ts=current_start, + next_fetch=entry.next, + last_fetch_time=int(time.time()), + ), ) current_next_fetch = entry.next updates = [] @@ -342,7 +347,11 @@ def log(event: str) -> None: low_fetch_counter = 0 yield state.FetchDelta( {f"{entry.member_id}-{entry.id}": entry for entry in updates}, - NCMECCheckpoint(get_entries_max_ts=current_end, next_fetch="", last_fetch_time=int(time.time())), + NCMECCheckpoint( + get_entries_max_ts=current_end, + next_fetch="", + last_fetch_time=int(time.time()), + ), ) current_start = current_end current_next_fetch = ""