Skip to content

Commit

Permalink
Use Optional not X | None
Browse files Browse the repository at this point in the history
  • Loading branch information
Northo committed Aug 12, 2024
1 parent b145b8a commit 21e0223
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dvc_data/index/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 21e0223

Please sign in to comment.