Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions patchdiff/pointer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Any, Hashable, Iterable
from typing import Any, Hashable, Iterable, cast

from .types import Diffable

Expand Down Expand Up @@ -86,7 +86,7 @@ def evaluate(self, obj: Diffable) -> tuple[Diffable | None, Hashable, Any]:
# integers (iapply does the same at the leaf).
if not hasattr(parent, "append"):
raise
cursor = parent[int(key)]
cursor = parent[int(cast("str", key))]
# The leaf may legitimately not exist (add ops on dicts, list
# "-" append) so we tolerate lookup failures there — but only
# when the parent is itself a container we can write into.
Expand Down