From 21e0223bc5a9f5ecf1b681840b63c3b843d930f8 Mon Sep 17 00:00:00 2001 From: "Thorvald M. Ballestad" Date: Mon, 12 Aug 2024 10:39:48 +0200 Subject: [PATCH] Use Optional not X | None --- src/dvc_data/index/diff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dvc_data/index/diff.py b/src/dvc_data/index/diff.py index a40bd810..40fd5eb8 100644 --- a/src/dvc_data/index/diff.py +++ b/src/dvc_data/index/diff.py @@ -264,7 +264,7 @@ def _get_key(change): deleted.sort(key=_get_key) # Create a dictionary for fast lookup of deletions by hash_info - deleted_dict: dict[HashInfo | None, deque[Change]] = defaultdict(deque) + deleted_dict: dict[Optional[HashInfo], deque[Change]] = defaultdict(deque) for change in deleted: # We checked change.old for all deleted above, so cast change_hash = cast(DataIndexEntry, change.old).hash_info